----------
Printing and Printer Setup
risc@finwds01.tu-graz.ac.at
german/Print.tex
Version 1.2
30/04/1996
To print a document you have to select a specific printer and this printer has to be given the right document format.
The print dialog allows you to do both in one step. You can only select between printers that support the required document format.
All you have to do is to select a printer and maybe the number of copies. All other settings are done by the program.
For the above mentioned easy way of printing you first have to create a local printer configuration. Click on Setup to go to the printer setup dialog.
If you do this the first time then you will find some sample printers already provided. They probably don't work for you but you may want to modify them instead of providing your own.
Please keep in mind that there is a difference between a logical and a physical printer.
Adding and changing settings for logical printers is done in the printer setup dialog:
The selection box short name allows you to select one of the already existing logical printers. The settings for this printer will be displayed and may be changed. Clicking on Change will make the modifications permanent for the current session, using Save instead will also save the new settings (for all printers) to disc so they are available the next time you start your application.
You add a new printer by clicking on Add and giving a short name for the new printer. After that you may fill out the empty form.
The field long name contains the name of this printer as seen by the user.
The printing command is essentially a shell command line that takes a file and prints it out in the given format and with the given settings. Some special symbols will be substituted before the command is actually passed to the shell:
You may use the already installed printers as examples -- look at lj5ascii and lj5p2 for details.
The document type gives the input format for the logical printer device. The command line has to convert it into the actual ouput format supported by the physical printer.
The data in the Page menu gives information on your currently installed paper to the programm. Note that this is of no use if your real printer does not support these options -- if you set the page format to say CL but actually have only letter format paper in your printer then this is not the programs fault...
The Misc section currently contains only the icon name of the printer (this icon will be shown in the print dialog if the user select the printer). You may name your own icon here, but note that this has to be in xpm-format with an extension of .xpm and that you normally give no path as the programm will search for it in the environment variable SOFTWORKS.
If you want to change the printer settings for all users then you may do so by changing the global printer configuration file.
This file may be found in the cfg subdirectory of the installation and is named txPrint.cfg. The default file looks something like this:
; printer config file 26/02/1996 [Printer-lj5ps] Name=HP Laserjet 5L (PS) Format=ps Command=lpr %f Icon=Printer Margins=0 0 0 0 Page=A4 [Printer-lj5ascii] Name=HP Laserjet 5L (Ascii) Format=ascii Command=lpr -#%c -U '%u' -T '%T' %f Icon=Printer Margins=0 0 0 0 Page=A4 ...more...
It contains definitions for postscript, ASCII-text and the printout of HTML-files. You may modify already existing entries or you may add new entries to this file.
An entry has the following format:
[Printer-<Short>] Name=<Description> Format=<Typ> Command=<PrintCommand> Icon=<Icon> Margins=<Margin> Page=<PageFormat>
<Short> is a short name for the printer which will also be entered into the list of printers [Print]Printers. <Description> is the name of the printer as shown in the selection dialog box, <Typ> describes the document type that may be printed with this printer (eg. html, ps) and the <PrintCommand> is the actual command that send a file to the printer.
The special sequences %f for the filename, %u for the username, %d for the document title, %t for the document type, %T for the date and %c for the number of copies may be present and will be substituted when the command is executed.
As you can see in the example the same physical printer may be entered more than one time if he supports more than one document format.