winprint [options] reportfile_name [reportfile_name*]
Winprint will process any options and the spool the text files named on the command line. (You can spool more than one text file).
Following are a few of the options winprint understands. For a complete list, double click on $APPXPATH/winprint.exe.
| -orientation= | text | landscape or portrait |
| -font= | text | Windows printer font name |
| -pitch= | integer | point size for output font |
| -printer_id= | text | Windows name for target printer |
| -form_id= | text | Windows name for target form |
| -copies= | integer | number of copies to print |
| -collate | boolean | if present, collate output |
| -ruler | boolean | if present, print ruler |
| -config= | text | path name of configuration file |
| -printer_ctl= | text | additional printer options |
| -form_ctl= | text | additional form options |
Notes:
options to winprint can come from four different sources:
When APPX invokes the winprint program, it first builds a Configuration file containing the above options, then invokes winprint with the following command line:
winprint -config=REPORT01.CFG REPORT01.
The values specified in the -config file are obtained as follows:
The System ID of an APPX Printer should be set to the Windows Printer name (as it appears in Control Panel - remember, you may have to shorten the Windows Printer Name).
If you want to specify -orientation, -font, -pitch, -collate, or -ruler, you must include the appropriate option in the Form or Printer control string.
For example, an APPX Form named "LANDSCAPE" should (probably) have a Form Control string of "-landscape".
-form_id is only supported under Windows NT
-banner, -date, -disposition, -format, -form_name, -mode, -notify, -priority, -printer_name, and -user are ignored by winprint.exe but may be present in the -config file.
Just so I'm clear; does winprint convert the -font and -pitch to printer specific codes so that these 2 switches will work with most printers?
Good question!!!!
Under Windows, we don't have a direct interface to the printer - in other words, we can't just send a stream of characters to the printer port like you would expect. Instead, we have to call a series of functions which paint the page image the way we want it printed, for example, move to "pixel" 10,20 and paint a 'w' in the currently selected font.
It is the job of the printer driver (supplied either by Microsoft or the printer manufacturer) to translate our painted pages into a sequence of escape sequences (or
postscript commands or PCL commands) specific to the printer.
Winprint doesn't know what kind of printer you have connected - you could even use a product like WinFax to send a FAX from APPX.
So the -font and -pitch flags are supported as long as the printer driver knows how to deal with them.
Note: Copy count, collation, orientation, and form size are also interpreted by the printer driver.
Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.