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

EN Programming Tips for Using PJL 11-17
Spooler Job That Prints a Banner Page Followed by
an Application-Generated Job (Application specifies
printer language)
The following example demonstrates a spooling application that prints
a banner page, and then prints a PostScript job. The application that
produced the print file specifies the printer language.
<ESC>%-12345X@PJL <CR><LF>
@PJL COMMENT Spooling Job with Banner <CR><LF>
@PJL JOB NAME = "Spooler #1" <CR><LF>
@PJL ENTER LANGUAGE = PCL <CR><LF>
<ESC>E . . . Banner Page Data . . . <ESC>E
~<ESC>%-12345X
~<ESC>%-12345X@PJL <CR><LF>
@PJL ENTER LANGUAGE = POSTSCRIPT <CR><LF>
%!PS-ADOBE . . PostScript print data . . ^D
~<ESC>%-12345X
~<ESC>%-12345X@PJL <CR><LF>
@PJL EOJ <CR><LF>
<ESC>%-12345X
Spooler Job That Prints a Banner Page Followed by
an Application-Generated Job (Application Does Not
Specify Printer Language)
The following example demonstrates a spooling application that prints
a banner page. The application was not created with a PJL-ready
driver, so it does not begin and end with UEL commands, or specify
the printer language—the printer implicitly switches to the correct
printer language.
<ESC>%-12345X@PJL <CR><LF>
@PJL JOB NAME = "Spooler #2" <CR><LF>
@PJL ENTER LANGUAGE = PCL <CR><LF>
<ESC>E . . Banner Page Data. .<ESC>E
~<ESC>%-12345X
. . . PCL or PostScript print data . . .
~<ESC>%-12345X@PJL <CR><LF>
@PJL EOJ <CR><LF>
<ESC>%-12345X