![background image](http://html.mh-extra.com/html/hp/4600-color-laserjet-laser-printer/4600-color-laserjet-laser-printer_technical-reference-manual_163672264.webp)
Example:
Switching Printer
Languages
The job in this example prints two pages: one in PCL and
one in PostScript. The program first enters PCL, and then
immediately enters HP-GL/2 to draw a box and print “PCL
Print Job.” Next, PostScript is entered and PostScript data
is sent to the printer to draw a box and print “PostScript
Job.”
<ESC>%-12345X@PJL <CR><LF>
@PJL COMMENT **Beginning of PCL Job** <CR><LF>
@PJL COMMENT **Enter PCL (& HP-GL/2)* <CR><LF>
@PJL ENTER LANGUAGE = PCL <CR><LF>
<ESC>E<ESC>%0BIN;SP1;PA1010,1010;PW2.2;
~
PD5310,1010,5310,5310,1010,5310,1010,1010;
~
PU;PA2280,3040;
~
SD1,277,2,1,4,20,5,0,6,0,7,4148;
~
DT*;SS;LBPCL Print Job*;
~
<ESC>%0A<FF><ESC>E
~
<ESC>%-12345X@PJL <CR><LF>
@PJL COMMENT *** END OF PCL JOB & *** <CR><LF>
@PJL COMMENT ** START OF POSTSCRIPT * <CR><LF>
@PJL ENTER LANGUAGE = POSTSCRIPT <CR><LF>
5 setlinewidth<CR>
100 100 moveto<CR>
0 300 rlineto<CR>
300 0 rlineto<CR>
0 -300 rlineto<CR>
closepath<CR>
stroke<CR>
185 240 moveto<CR>
/Helvetica findfont 20 scalefont setfont<CR>
(PostScript Job) show<CR>
showpage<CR>
^D
~
<ESC>%-12345X
C-2 Programming Examples
Summary of Contents for 4600 - Color LaserJet Laser Printer
Page 18: ...1 6 Introduction to PJL ...
Page 36: ...3 8 Using PJL ...
Page 46: ...4 10 Kernel Commands ...
Page 66: ...Figure 6 1 How Environments Affect the Print Job 6 4 Environment Commands ...
Page 108: ...6 46 Environment Commands ...
Page 180: ...9 18 PJL File System Commands ...
Page 212: ...10 32 Programming Tips ...
Page 262: ...B 6 PJL Command Summary ...
Page 302: ...Glossary 10 ...