HP PCL/PJL reference - Printer Job Language Technical Reference Manual

3-4 Using PJL EN
Some Sample PJL Jobs
This section consists of two basic PJL jobs that illustrate how to use
PJL. The first job changes a few printer control panel settings and
prints a PCL file. The second job prints a PCL file followed by a
PostScript file. (The ~ symbol indicates that the command line is
actually part of the previous line.)
Example: Changing Control Panel Settings
This example simulates using PJL to control printer features that are
not available in a particular application program. In this case, the
features to be modified are the number of copies and the Resolution
Enhancement technology setting.
<ESC>%–12345X@PJL COMMENT *Start Job* <CR><LF>
@PJL JOB NAME = "Sample Job #1" <CR><LF>
@PJL SET COPIES = 3 <CR><LF>
@PJL SET RET = OFF <CR><LF>
@PJL ENTER LANGUAGE = PCL <CR><LF>
<ESC>E. . . . PCL job . . . .<ESC>E
~<ESC>%–12345X@PJL <CR><LF>
@PJL EOJ<CR><LF>
<ESC>%–12345X
Example: Switching Printer Languages
This example contains two print jobs, one PCL and one PostScript.
The PCL job prints first, then PJL code switches the printer language
to prepare for the PostScript job.
<ESC>%–12345X@PJL <CR><LF>
@PJL COMMENT ** Beginning PCL Job ** <CR><LF>
@PJL ENTER LANGUAGE = PCL <CR><LF>
@PJL SET LPARM : PCL SYMSET = DESKTOP <CR><LF>
<ESC>E . . . . PCL job . . . .<ESC>E
~<ESC>%–12345X@PJL COMMENT End PCL <CR><LF>
@PJL COMMENT Ready for PostScript Job <CR><LF>
@PJL ENTER LANGUAGE = POSTSCRIPT <CR><LF>
%!PS-ADOBE ... PostScript print job ... ^D
~<ESC>%–12345X