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

11-4 Programming Tips for Using PJL EN
Print Data Generator Examples
The following two examples demonstrate how applications
categorized as “Print Data Generators” should use PJL. Both
examples work well if sent directly to the printer or through a spooler.
Jobs That Select a Printer Language
This example selects a printer language using the ENTER command.
It is the most common job format for Print Data Generators.
<ESC>%-12345X@PJL <CR><LF>
@PJL ENTER LANGUAGE = POSTSCRIPT <CR><LF>
%!PS-ADOBE ... PostScript code ... ^D
~<ESC>%-12345X
Jobs That Set Printer Features
This example specifies two feature settings that cannot be
selected using the specified printer language:
<ESC>%-12345X@PJL <CR><LF>
@PJL SET RET = LIGHT <CR><LF>
@PJL SET RESOLUTION = 600 <CR><LF>
@PJL ENTER LANGUAGE = PCL <CR><LF>
<ESC>E ... PCL print data ... <ESC>E
~<ESC>%-12345X@PJL <CR><LF>
@PJL RESET <CR><LF>
<ESC>%-12345X