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

EN Status Readback Commands 7-37
Note Some HP LaserJet printers support job cancellation. For information
about unsolicited job status during job cancellation, see the “Job
Cancellation” section in Chapter 5.
Example: Using Unsolicited Job Status
This example turns on unsolicited job status so that the spooler can
be notified when the job starts and completely finishes. A job name is
included so that the spooler can match the status information with the
correct job. (The indented lines indicate a job sent to the spooler from
another application.)
<ESC>%-12345X@PJL <CR><LF>
@PJL USTATUS JOB = ON <CR><LF>
@PJL JOB NAME = "JOB 14993" <CR><LF>
<ESC>%-12345X@PJL <CR><LF>
@PJL ENTER LANGUAGE = PCL <CR><LF>
<ESC>E . . . PCL Job . . . <ESC>E
~<ESC>%-12345X
~<ESC>%-12345X@PJL <CR><LF>
@PJL EOJ NAME = "JOB 14993" <CR><LF>
<ESC>%-12345X
A sample unsolicited HP LaserJet 4 printer response for this example
is as shown here. For other printers, the response may be different.
@PJL USTATUS JOB<CR><LF>
START<CR><LF>
NAME="JOB 14993"<CR><LF> (from the JOB command)
<FF>
[ . . time period while job is printing . . .]
@PJL USTATUS JOB<CR><LF>
END<CR><LF>
NAME="JOB 14993"<CR><LF> (from the EOJ command)
PAGES=3<CR><LF>
<FF>