![]() |
![]() ![]() Does Winprint -width and -length work? |
Printer vendors provide two interfaces via their printer drivers to their printers: interactive and non-interactive interfaces.
The interactive interface is the one you see when you (for example) click on (F)ile, Page Set(u)p in MS Word. You can see this same interactive printer interface, if you use pass an APPX Printer Control or Form Control parameter of "-interactive". Check to see if the operator-supplied lengths and widths work when you use this APPX Interactive printer interface option. The non-interactive version of the Printer Vendor's printer driver does not stop for enduser interaction every time the printer is selected. It uses switches defined in your Printers or Forms Controls. APPX passes '-' parameters (including -length and -width) directly to the Windows Print Spooler Interface. Windows then passes these parameters to the printer driver. We've run into a number of cases where the printer driver's interactive interface honors length and width specifications, but their non-interactive interface doesn't. (This makes some sense, since most Windows apps require you to go thru the interactive interface, as opposed to APPX which has its own optional interactive interface in the form of the --- INPUT DISPOSITION process. So many Printer Vendors didn't bother initially to debug their non-interactive driver interface.) Try a different printer model or manufacturer, to see if the -width and -length Form Control parameters work there. You'll probably find that it does. If it works for the other printer, and for the current printer interactively but not non-interactively, your best bet is to try to download a newer driver from your Printer Vendor, or go to the Printer Vendor for support on this issue. Or, you can require your endusers to use the "-interactive" switch in Forms Control, and thereby the Printer Vendor's interactive interface. The WINPRINT.EXE program is invoked by APPX whenever a report is spooled to the printer. Winprint actually does the spooling. Winprint.exe accepts the following command line arguments: 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: Options specified on the command line Options specified in the file specified by the "-config=" file Options specified in the -printer_ctl= option Options specified in the -form_ctl= option 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: -banner --- PRINT BANNER -copies --- PRINT COPIES -date --- PRINT SPOOL DATE -disposition --- PRINT FILE DISPOSITION -format --- PRINT FORMAT -mode --- PRINT MODE -notify --- PRINT NOTIFY USER -priority --- PRINT PRIORITY -user OS User Name -form_ctl Form Control string for -form_name -form_id System Form ID for -form_name -form_name --- PRINT FORM ID -printer_ctl Printer Options string for -printer_name -printer_id System Printer ID for -printer_name -printer_name --- PRINT PRINTER ID 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. | |
[Append to This Answer] | |
2010-May-20 12:29am |
Previous: |
![]() |
Next: |
![]() |
|