Main Window Command Buttons
Help for Text Print

Text Print is a Windows program for printing text files.  Its primary purpose is to print text files in 2 Up and 4 Up format, but a great deal of flexibility is provided in setting up the page layout.

Main Window Commands

Settings

Browse

Print!

Delete and Delete All

Pause and Resume

Exit

Additional Topics

Background Printing

Drag and Drop

Command Line Parameters

Copyright


Settings Command

The Settings command displays the settings dialog.  You can use this dialog to change the page size, the layout of the pages on the paper, the printer or the font.  Once you have changed the settings, you can give your new setup a name or you can use it temporarily.

You may use any named setup that you have previously created by selecting it in the Setup control of the Text Print main window.


Browse Command

The Browse command displays a file open dialog from which you may choose a file to print.  Selecting a file in the open dialog and then pressing "Ok" will put the file in Text Print's queue.  The path to the selected file is also copied into the Print file box of the Text Print main window.

You can customize the file types list in the file open dialog by adding a [FileTypes] section to the TEXTPRT.INI file in your Windows directory.  This section may contain any number of type name and file pattern specifications.  The first file type specification in this section will be the default.  For example:

[FileTypes]

All Files (*.*)=*.*

C/C++ Source Files (*.c;*.cpp;*.h)=*.c;*.cpp;*.h

Assembler Source (*.asm;*.inc)=*.asm;*.inc

Text Files (*.txt)=*.txt

Readme Files (read*.*)=read*.*


Print! Command

The Print! command will add the file specified in the Print file box to the Print queue.


Delete and Delete All Commands

The Delete command will delete the file that is currently highlighted from the Print queue.  If the currently printing file is deleted, it will show up in the Completed list as "canceled".

The Delete All command removes all jobs from the Print queue.


Pause and Resume Commands

The Pause command temporarily halts printing of any queued files.  Printing may be restarted by selecting the Resume command.


Exit Command

The Exit command closes the Text Print window.


Background Printing

Text Print performs its printing tasks in the background.  Whenever you select a file to be printed, it is placed in the print queue along with the settings that were in effect at the time the file was queued.  The file will be printed using those settings, even if you change settings before Text Print processes the file.

You may use the Delete or Delete All commands to cancel a file until Text Print has completed processing the file.  After Text Print has completed, you must use the Windows Print Manager if you want to cancel any unprinted portion of the file.


Drag and Drop

You may print files by dragging them from the Windows File Manager onto the Text Print window or icon.  If you drop a file in the Text Print window or onto the icon of a running copy of Text Print, the file will be printed using the settings currently selected for that copy of Text Print.  If you drop a file onto a Windows Program Manager icon for Text Print, the file will be printed using the default setup unless a setup is specified in the command line of the Program Manager icon.


Command Line Parameters

The command line for Text Print may contain setup names and names of files to print.  Setup names are specified with the option:

-s "setup name"

The setup name must be enclosed in double quotes if it contains any spaces.  When a setup name is specified, it applies to all file names that follow.

If any file names appear on the command line, Text Print will automatically exit after it has printed the last file.

You may find it useful to create several Program Manager icons for Text Print, each with a different setup name parameter.  You can then drop files on the appropriate icon to print them in the desired format.


Settings Dialog

The Settings dialog is organized into several sections.

At the top of the window, the Setup Name control shows the currently selected setup.  You can drop down a list of saved settings by pressing the arrow button to the right of the edit control.  Choosing from this list will display the values currently saved for that setup name.  You can also type a name into this edit control and then press the Save button to create a new setup.  Pressing the Delete button deletes the setup whose name is currently displayed.  Pressing the Default button makes the currently displayed setup the default setup.  Setup names can be as long as you like and can contain spaces.  All setups are stored in the file TEXTPRT.INI in your Windows directory.

In the center of the window, the Page Settings control the format of logical pages of text.  The Layout section controls how the logical pages are displayed on a sheet of paper.

Near the bottom, the Printer... command button allows you to choose a printer and to change some printer settings, notably the paper size.  The currently selected printer is displayed next to this button.  If the printer name is enclosed in parenthesis, the default printer is selected, otherwise a specific printer has been selected.

The Font... command button allows you to select the font used for printing.  The family name of the currently selected font is displayed next to this button.

The Ok button makes the displayed settings the current settings.  If you do not press the Save button before pressing the Ok button, the changes you have made to the settings are only temporary, and will be lost when you exit from Text Print.  The Cancel button cancels any changes to the current settings, but does not undo any changes you may have made to saved setups.


Page Settings

The settings in this portion of the settings dialog control how a logical page is formatted, you can print more than one logical page on a sheet of paper.

Lines per page and chars per line control the amount of text that appears on a logical page.  A standard letter size page contains 66 lines 80 characters wide.

Space tab stops controls how many spaces appear between tab stops.  The default is 8.

The Margins... command button displays a dialog that allows you to adjust the white space surrounding the page.

The Options... command button displays a dialog that allows you to select additional printing options.


Layout

The settings in this portion of the settings dialog control how logical pages are arranged on the paper.

Pages wide controls the number of logical pages across the paper.  Pages high controls the number of logical pages down the paper.  Page numbers run left to right, top to bottom on the sheet of paper.

The 2 up and 4 up buttons set the Pages wide, Pages high, and paper orientation for 2 up printing or 4 up printing.

The Portrait and Landscape buttons allow selection of the paper orientation.  Note that changes to paper orientation made in the Printer dialog are reflected in these buttons.


Printer

The Printer... command displays a dialog that allows you to select a printer.  Only the printer and paper size selected in this dialog are honored by Text Print.  The page orientation setting in the printer dialog is ignored, the orientation may be changed in the Layout settings.


Font

The Font... command displays a dialog that allows you to select a font for printing.  All fixed pitch fonts available on the currently selected printer are displayed.

Text Print makes no determination as to whether the font you select is suitable for the other settings you have chosen.  It just tries to print, using the selected font.  TrueType fonts are scalable, making them usable with most settings.  Printer fonts may or may not be scalable, depending on the printer.  For example, the LinePrinter font, built into most LaserJet printers, is suitable for 2 up printing, but not for 4 up printing.


Setting Margins

The Margins dialog allows you to control the margins surrounding the sheet of paper, the gutter space between logical pages and to offset the logical pages on the sheet.  All of the settings in the Margins dialog are expressed in 0.01 inch units.

The "Top and Bottom" and "Left and Right" margins control the amount of white space surrounding the sheet of paper.  The "Horizontal gutter" and "Vertical gutter" settings control the space between logical pages on a sheet.  The "Horizontal offset" and "Vertical offset" allow you to adjust the position of the logical pages on the sheet.  The offset parameters are also useful to provide space for punching 3 ring binder holes.

The margin and gutter settings are minimum values.  Because the character cells must be an integral number of device pixels wide and high, there may be a significant number of pixels left over after calculating the page layout.  These extra pixels are evenly distributed among the margins and gutters.


Options Dialog

If Print headings is checked, then each logical page will contain a heading with the file name on the left, the time and date in the center and a page number on the right.  The headings will be printed in bold type if the selected font provides it.

If Frame headings is checked then a box will be drawn around the page headings.  If Frame pages is checked then a box will be drawn around each logical page.

If Use file time/date in headings is checked, then the modification time of the file will be printed as the time if headings are printed.  If this option is not checked, the time the file was added to Text Print's print queue is used.

If Print line numbers is selected then a four digit line number will be printed to the left of each line.  Lines in the file longer than chars per line will be wrapped to multiple lines on the logical page.  The line numbers reflect the lines in the file.

If Hexadecimal dump is checked, the contents of the file will be displayed in hexadecimal.

If OEM to ANSI translation is checked, the characters in the file are translated from the OEM character set (used by DOS) to the ANSI character set (used by Windows) before printing.


Copyright
Copyright Information

Copyright © 1993 J.T. Anderson.

This program may be freely distributed provided that the program and associated help file are distributed together in unmodified form.  The program and help file may not be included with any commercial product other than Shareware/Freeware collections without the express permission of the author.

No registration fee is requested, but comments can be sent to:

J.T. Anderson

2515 Grant Ave. #1

Redondo Beach, CA 90301

jta@locus.com


Revision History

Version 1.00

Initial release.

Version 1.01

The tab size setting was not being read from the settings dialog.

Added OemToAnsi translation option (instead of doing it all the time).


2 Up
2 Up printing prints two logical pages on a sheet of paper in landscape orientation.


4 Up
4 Up printing prints four logical pages on a sheet of paper in portrait orientation.


The Setup control is a drop down list, labeled "Setup:", that lists all of the setups that you have created.  The current setup is displayed in this control.


The Print file box is an edit control, labeled "Print file:", in the main Text Print window.


Text Print performs its printing tasks in the background.  The list labeled "Print queue:" shows the files waiting to be printed.  The top file in this list is the file that is currently printing.


The list labeled "Completed:" shows the last 40 files that have been printed along with a completion status.  If the file was successfully printed, the number of pages in the file is shown.  Otherwise, an error message or "Canceled" is shown.


The default setup is used when Text Print is started with no setup name specified on the command line.


Fixed pitch fonts are fonts where all characters have the same width.


TrueType fonts are shown in the font dialog with a "TT" symbol to the left of the font name.


Printer fonts are shown in the font dialog with a vaguely printer like icon to the left of the font name.