*WINDEV* |
Raw Print Mode |
1. |
OPEN (chan[,fileopt])"*WINDEV*[;Q_name]" | |
2. |
OPEN INPUT (chan[,fileopt])"*WINDEV*[;Q_name]" | |
3. |
OPEN [INPUT] (chan[,fileopt])"[WDX]*WINDEV*[;Q_name]" |
chan |
Channel or logical file number (e.g. open (1)"*windev*"). | |||||||||||||||
fileopt |
File options. Supported options for opening *WINDEV* include:
See About File OPEN Options for the OPEN directive. To obtain the current OPT= value, use the OPT( ) function. | |||||||||||||||
Q_name |
Print queue to open. (If you omit the queue name, a printer selection dialogue appears at run time to let the user select the printer and its properties.) Valid Q_name options include:
The Q_name is optional. *WINDEV* does not support setting queue options (graphical printer properties in the Windows Printer dialogue box such as ORIENTATION=landscape;copies=3). | |||||||||||||||
*WINDEV* is specific to Windows operating systems. Under UNIX, PxPlus automatically directs *WINDEV* access to the WindX client: open (14)"*windev*" ! For the PC client from UNIX host open (14)"*windev*" ! For the NT host | ||||||||||||||||
*WINDEV* |
Keyword, not case sensitive. Special device filename, enclosed in quotation marks within the OPEN directive. (Include * asterisks in syntax) |
Use *WINDEV* with your OPEN and/or OPEN INPUT directives to gain access to the Windows print subsystem in raw or pass-through mode. For standard API access, use *WINPRT* Windows Printing.
You can identify the LPT for direct local access to the port or use UNCs (Universal Naming Conventions) for transmissions to a shared resource. For both LPT and UNC use, note that you can use raw escape sequences but graphical printing is not supported. LPT identification is not recommended under Windows NT.
Normally, you can take advantage of *WINDEV* to send data to the printer without having the driver strip out escape codes (for instance, to pass PCL code to the printer). That is, you can use escape sequences with *WINDEV*, but these must be both valid and supported by your given printer and print driver.
PxPlus recognizes *WINDEV* as a special device file in your OPEN [INPUT] directive and deals with it internally in the language at run time. PxPlus returns an Error #12: File does not exist (or already exists) on the OPEN if no printers are installed or if the user selects the Cancel button in a printer selection dialogue. (This error can also occur if no printer is "Set As Default".)
PxPlus supports raw mode to send raw data to a Windows printer. You can control raw printing mode using the 'RP' system parameter. This parameter's default is ON. When you turn it OFF, PxPlus uses the old pass through mode.
The printer drivers should not (but might) strip escape sequences from the data you send to *WINDEV*. Support for raw mode is printer and driver-dependent. Some drivers can destroy certain escape sequences (removing them from the data stream). If escape sequences disappear from your *WINDEV* print jobs, check the sequences for validity and check printer/driver appetites with their manufacturers.
OPEN (chan[,fileopt])"*WINDEV*[;Q_name]"
Use this format to open the *WINDEV* device file to pass print jobs through in raw mode to the given queue on your open channel. See *WINPRT* / *WINDEV* Printing Examples.
OPEN INPUT (chan[,fileopt])"*WINDEV*[;Q_name]"
Use the OPEN INPUT directive to open *WINDEV* in read-only mode when you only want to determine the name and properties of a printer without sending a physical job. With an OPEN INPUT directive, you can open the printer, query the printer's properties, and close the channel without starting a physical job.
Use the WINPRT_SETUP READ PROPERTIES directive or the MXC( ) / MXL( ) functions without generating a Form Feed:
if WDX%<>$00$ then open input (30)"*WINDEV*;ASIS"
C=mxc(30)+1 ! Zero-based. For this printer mxc(30)=79, C=80 (0-79 columns)
L=mxl(30)+1 ! Also zero-based
winprt_setup read properties WHAT_PROP$
! WHAT_PROP$ returns printer-specific list (items such as COPIES=1, OFFSET=0:0)
OPEN [INPUT] (chan[,fileopt])"[WDX]*WINDEV*[;Q_name]"
On an NT or PC server, if you include [WDX] in your OPEN [INPUT] directive (e.g. open (30)"[WDX]*WINDEV*"), then that signals PxPlus to direct any print jobs and dialogues to the WindX client PC, which will in turn use its Windows print subsystem to send jobs to the given printer.
If you are using *WINDEV* on an NT Server and do not use [WDX] in your OPEN directive, then the printer selection dialogue will appear on the server console, and any print queue you name directly must exist on the NT server in the Control Panel Printers folder.
WINPRT_SETUP Windows Printer Setup
MXC( ) / MXL( ) Return Maximum Column/Line
*WINPRT* / *WINDEV* Printing Examples
[WDX] Direct Action to Client Machine