The HP-GL/2 language prints vector graphics. The PCL language in the PCL5 emulation defines the area on the page where the HP-GL/2 graphics print and it provides the means to enter the HP-GL/2 mode. To print with HP-GL/2, you have to exit from the PCL mode and enter in HP-GL/2 mode.
Syntax: XX ##,##;
XX is a two-letter mnemonic that represents the function.
## is the parameter.
If a required parameter is missing, 0 is assumed.
, is a required separator, i.e. one or more commas and/or spaces.
; can be used as terminator. The EOF (decimal 255), ETX (decimal 003) and the first letter of the next mnemonic are also recognised as a terminator.
When the printer receives one of the following escape sequences, it switches to HP-GL/2 mode:
<ESC>%0B (sets the pen position at the previous HP-GL/2 pen position).
<ESC>%1B (sets the pen position at the previous PCL pen position).
The printer remains in the HP-GL/2 mode until it receives an Enter PCL mode command (<ESC>%#A) or a printer reset (<ESC>E) command. The HP-GL/2 mode will also be exited when a print job is prematurely ended.
When you are in the HP-GL/2 mode and you want the printer to interpret PCL commands, you must use one of the following escape sequences to return to the PCL mode:
<ESC>%0A (sets the pen position at the previous PCL pen position).
<ESC>%1A (sets the pen position at the current HP-GL/2 pen position).