Copyright: Copyright (C) 1998 Örjan Råberg


TxtPrint Help Topics

Introduction

What is TxtPrint?

Copyright and information

Usage

User interface

Adding files to print

Printing files

Command line arguments

Change settings

User interface reference

FILES list

Paper settings

Page settings

Headers and footers

Font settings

File extensions

Menu reference

File menu

Edit menu

View menu

Help menu


What is TxtPrint?

TxtPrint is a small application designed mainly for one purpose: Printing out text files.

By numerous settings, you will have precise control over the output. TxtPrint can be used to print all kinds of text files, but I think programmers printing out source code do appreciate the features most.

The main advantage with TxtPrint compared to standard text editors is the ability to divide the page in several columns and rows. This is very useful for saving paper and getting more text on a single paper.

An additional feature is to handle files with different file extensions differently. You can for example define that files with a certain file extension always should be printed using a predefined tab spacing.

The national setting in the Windows control panel affects the way TxtPrint sorts filenames, how date and time are formatted etc. Besides, two versions of the program are available: English and Swedish.


Copyright and information

TxtPrint version 1.0 May 1998

Copyright © 1998   Örjan Råberg   All Rights Reserved.

TxtPrint is released as freeware, and there is no cost associated with using it.

TxtPrint is supplied as-is. The author offers no warranty of its fitness for any purpose

whatsoever, and accepts no liability whatsoever for any loss or damage incurred by its use.

TxtPrint is not a supported product. The author accepts no commitment or liability to address

any problems that may be encountered in using it.

You may distribute TxtPrint to anyone, including online services You may however not distribute it as part of a commercial product. You may not charge anyone for it other than a reasonable fee to cover your distribution costs.

Without written permission by the author, you may not modify TxtPrint.

If you have any suggestions or would like to report bugs, please use the following address:

d4orjan@dtek.chalmers.se

Visit the TxtPrint homepage:

http://www.dtek.chalmers.se/~d4orjan/TxtPrint/index.html


User interface

The first thing you may notice about the user interface is that there are not many dialog boxes. Instead, most settings are altered directly in the main window. At first, this can be a bit confusing, but it makes it possible to alter the settings very quickly without having to go through a lot of dialog boxes.

The main window is made up of a large tabbed subwindow with six pages. The first page contains filenames of the files that is to be printed. The other five handle the program settings.

Part of the user interface looks best with newer versions of the common controls dll that is not normally shipped with Windows. Versions later than 4.70 of COMCTL32.DLL will enable all features. Self extracting files containing COMCTL32.DLL can be downloaded from ftp://ftp.microsoft.com/softlib/mslfiles/

COM32UPD.EXE contains version 4.70 and 40COMUPD.EXE contains version 4.72.

These files are also shipped with Internet Explorer, version 3 and 4.

The program should however work correctly without the latest version of COMCTL32.DLL.


Adding files

The easiest way to add files to be printed is by dragging them into the main window.

Files can be dragged from e.g. Windows Explorer.

Another way is by using the Add files to be printed command on the File menu or the corresponding toolbar button. That will open up a standard windows file open dialog box, where you can select the files you want to add.

It is also possible to specify what files to add for printing at program startup. See Command line arguments for more information.


Printing files

After adding files, you probably want to print them. The Print command on the File menu can be used to print all files.The Print dialog box will be displayed so that you can change settings. The corresponding button in the toolbar also prints all files, but won't display the Print dialog box. To print only the selected files, use the Print selected file(s) command.

If TxtPrint is invoked with the flag /p or -p, all files are printed directly. See Command line arguments for more information.


Command line arguments

TxtPrint is started using the following syntax:

TxtPrint [/p] [filename1 filename2 filename3 ...]

filename

One or more files to be added for printing

Wildcards like * and ? can be used.

/p  (also -p, /print or -print)

Print the files specified on the command line and then quit

TxtPrint. It doesn't matter if /p is specified before or after the

file names. Printing will be done using the settings that were

saved the last time, or the default settings if no settings have

been saved.

You must add the path to TxtPrint to the operating system path to be able

use TxtPrint from the command line.


Change settings

All settings are done in the main window. See the user interface reference for more information on the various settings.


FILES list

The FILES list contain the files to be printed. You can selected one or more files and print out only them using the Print selected file(s) command on the File menu.

Select files using the mouse. Multiple files can be selected by pressing down CTRL while clicking at files.


Paper settings

Margins

Margins are specified in millimetres.

Orientation

Set orientation to printer default instead of registry value at startup means that even if you save settings with the Save settings command on the Edit menu, the saved value for orientation will not be used next time the program is started.

Page ordering etc.

Swap margins on even pages might be useful if you have a duplex printer and want the same top and bottom margin on both odd and even pages.


Page settings

Virtual page layout

Specifies how to divide the printed page.

A normal setting for source code printing is one row and two columns.

Page breaks

Physical page break after each file causes a hard page break after each file.

This option wastes more paper than necessary.

Virtual page break after each file only switch to the next virtual page after each file.

This option is good for saving paper

Virtual page break between two files if their names differ only by the file extension, and the two extensions are listed on the 'File ext.' page.

This option is useful when printing source code. The result is e.g. that .c-files appear on the same side as .h-files.


Headers and Footers

Place a check mark before the alternatives you want printed.

Dates and times will be formatted according to the current national locale setting.


Font settings

Printer font

Specifies the font to be used for printing.

Show fixed pitch fonts only in font selection dialog means that the font list in the dialog box will not contain fonts with variable pitch, like e.g. Times New Roman. TxtPrint works best with fixed pitch (non proportional) fonts, and source code should always be printed with such fonts..

Line wrap options

Truncate instead of wrap means that characters extending too far on the line will no be printed att all.

Wrap characters means that if the line extends too far, the last word on the line will be splitted and the remaining characters will be moved to the next line.

Wrap words doesn't split words. The last word on the line that cannot be printed as a whole will be moved to the next line.

Printable area

Print wrap arrow when wrapping lines adds a small arrow to each line having characters that extend too far. The arrow will also be printed at the beginning of the next line.


File extensions

About tab spacing

Normally when you edit a text file, you can insert tabs by pressing the tab button on your keyboard. It is then up to the editor to insert a tab character in your your text file. But how many characters should a tab character correspond to? The answer is that there is no standard here, so different editors treat the tab character differentely. Some editors don't even insert the special tab character, but instead insert spaces to emulate tabs (so called soft tabs). The popular editor emacs normally use a tab spacing of 8 characters, and insert spaces to emulate tab spacings that are not a multiple of 8.

If your printout looks ugly on the paper compared to in your editor, you will probably have to alter the tab spacing setting.

File extension list

This list contains all file extensions that are known to the program.The order of the extensions also defines the sorting order to be used between two files with the same name but with different file extensions. This is useful when printing source code, you can e.g. define that .h-files appear before .c-files in the output.

The extension Default is not a normal extension, but instead defines the tab spacing to use for files with extensions not in the extension list.

Use only default tab spacing turns off the special handling of file extensions.

Instead, the settings for Default applies to all files.

Edit extension

First select the file extension you want to edit, then define the tab spacing in the Tab Spacing edit box.

Add new extension

To add a new file extension, press the Add new extension button.

Then define the new file extension in the Add extension dialog

Delete extension

Select the file you want to delete, then press the Delete extension button to delete it.


Add extension dialog

Type the name of the new extension in the Extension edit box.

Set the tab spacing to use for this extension in the Tab spacing edit box.


File menu

The File menu offers the following commands:

Add file(s) to be printed	Adds files to be printed.
Remove selected file(s)	Removes files.
Print	Prints all files.
Print selected file(s)	Prints selected files.
Print Setup	Selects a printer and printer connection.
Print Preview	Displays all files on the screen as they would appear printed.
Print Preview selected file(s)	Displays selected files on the screen as they would appear printed.
Exit	Exits TxtPrint.


Edit menu

The Edit menu offers the following commands:

Save settings	Saves current settings to the Windows Registry.
Restore original settings	Restores original settings and removes settings from the Windows Registry.


View menu

The View menu offers the following commands:

Toolbar	Shows or hides the toolbar.
Warnings	Turns on or off viewing of warning messages.


Help menu

The Help menu offers the following commands, which provide you assistance with this application:

Help Topics	Offers you an index to topics on which you can get help.
About TxtPrint	Displays the version number etc. of this application.


Add files menu command
Add file(s) to be printed (File menu)

Use this command to add files.  Select the files to be added in the File Open dialog box

Shortcuts

Toolbar:

Keys:	CTRL+O


File Open dialog box

This is a standard Windows file open dialog.

Multiple files can be selected by holding down the CTRL key while clicking at files.


Remove selected file(s) menu command
Remove selected file(s) (File menu)

Removes all files selected in the FILES page.


Print menu command
Print (File menu)

Use this command to print all files. This command presents a Print dialog box, where you may specify the range of pages to be printed, the number of copies, the destination printer, and other printer setup options.

The Print button on the toolbar prints directly without displaying the Print dialog box.

Shortcuts

Toolbar:

Keys:	CTRL+P


Print selected files menu command
Print selected file(s) (File menu)

Use this command to print all files selected in the FILES list. This command presents a Print dialog box, where you may specify the range of pages to be printed, the number of copies, the destination printer, and other printer setup options.


Print Setup menu command
Print Setup (File menu)

Use this command to select a printer and a printer connection.  This command presents a Print Setup dialog box, where you specify the printer and its connection.


Print Preview menu command
Print Preview (File menu)

Use this command to display all files as they would appear when printed.  When you choose this command, the main window will be replaced with a print preview window in which one or two pages will be displayed in their printed format.  The print preview toolbar offers you options to view either one or two pages at a time; move back and forth through the document; zoom in and out of pages; and initiate a print job.

Shortcuts

Toolbar:

Keys:	CTRL+W


Print Preview selected files menu command
Print Preview selected file(s) (File menu)

Use this command to display the selected files as they would appear when printed.  When you choose this command, the main window will be replaced with a print preview window in which one or two pages will be displayed in their printed format.  The print preview toolbar offers you options to view either one or two pages at a time; move back and forth through the document; zoom in and out of pages; and initiate a print job.


Exit menu command
Exit (File menu)

Use this command to exit TxtPrint. You can also use the Close command on the application Control menu.

Shortcuts

Mouse:	Double-click the application's Control menu button.

Keys:	ALT+F4


Save settings menu command
Save settings (Edit menu)

Use this command to save all settings to the Windows Registry.


Restore original settings
Restore original settings (Edit menu)

Use this command to restore the original settings. In addition, the settings will be removed from the Windows Registry, which can be useful before deinstalling TxtPrint.


View Toolbar menu command
Toolbar (View menu)

Use this command to display and hide the Toolbar, which includes buttons for some of the most common commands in TxtPrint, such as File Print  A check mark appears next to the menu item when the Toolbar is displayed.

See Toolbar for help on using the toolbar.


Toolbar

The toolbar is displayed across the top of the application window, below the menu bar.  The toolbar provides quick mouse access to some tools used in TxtPrint.

To hide or display the Toolbar, choose Toolbar from the View menu (ALT, V, T).

Click	To

Add files to be printed.  TxtPrint displays the Open dialog box, in which you can locate and open the desired file.

Print all files directly.

Print preview all files

Context sensitive help


View Warnings menu command
Warnings (View menu)

Toggles warning messages on or off.

There are not many warning messages in TxtPrint, but there is at least one that can be annoying:

If you specify printer margins outside your printer’s printable area, you will normally get a warning. However, because some printer drivers return incorrect information, the warning may not apply to you.


Help Topics
Help Topics (Help menu)

Use this command to display the opening screen of Help.  From the opening screen, you can jump to step-by-step instructions for using TxtPrint and various types of reference information.

Once you open Help, you can click the Contents button whenever you want to return to the opening screen.


About TxtPrint menu command
About TxtPrint (Help menu)

Use this command to display the copyright notice and version number of TxtPrint.


Context help
Context Help (Toolbar)

Use the Context Help command to obtain help on some portion of TxtPrint.  When you choose the Toolbar's Context Help button, the mouse pointer will change to an arrow and question mark.  Then click somewhere in the TxtPrint window, such as another Toolbar button.  The Help topic will be shown for the item you clicked.

Shortcut

Keys:	SHIFT+F1


No Help Available

No help is available for this area of the window.


No Help Available

No help is available for this message box.