Sends
a PRN file to a Windows printer.
A PRN file contains the data flow for the printer. (Ex : PCL). This data flow was previously generated by a “Print to file” command from Word or Excel.
Syntax
CHGVAR |
VAR(&CMD) VALUE('PRINTPRNF') |
CHGVAR |
VAR(&PARM1) VALUE(' File="Path to the PRN file to print"; Printer="Printer name"; [Document="Document name for the printer driver";] ') |
CHGVAR |
VAR(&PARM2) VALUE(' ') |
CALL |
PGM(LNCCMD) PARM(&HANDLE &CMD &OPT &PARM1 + &PARM2 &RESULT) |
Parameters
Parameters |
|
Parm1 or Parm2 |
File is the full path to the file to print. Most of the time, this file has the suffix PRN. It contains the printer dataflow.
Printer sets the printer were the file must be printed. The printer must be able to manage the dataflow. For example : The PRN file was generated by using a PCL 5 printer driver, then, the printer used by command PRINTPRNF must be PCL 5 compliant.
Document : This keyword allows to set the name of the print process into the Windows spooler. Optional.
|
Example
CHGVAR |
VAR(&CMD) VALUE('WPRINT') |
CHGVAR |
VAR(&PARM1) VALUE('Printer="HPLJ1200";OutFile="%TEMP%\Out.prn"') |
CHGVAR |
VAR(&PARM2) VALUE(' ') |
CALL |
PGM(LNCCMD)
PARM(&HANDLE &CMD &OPT &PARM1 + |
CHGVAR |
VAR(&CMD) VALUE('PRINTPRNF') |
CHGVAR |
VAR(&PARM1) VALUE('File="%TEMP%\Out.prn";Printer="\\server\HPLJ 2200"') |
CHGVAR |
VAR(&PARM2) VALUE(' ') |
CALL |
PGM(LNCCMD)
PARM(&HANDLE &CMD &OPT &PARM1 + |
See also