Loading

PCL commands

PCL commands are referred to as escape sequences that consist of two or more characters and usually start with the escape character. Escape sequences tell the printer what actions to perform.

Escape sequence syntax

There are two kinds of escape sequences:

  1. Two-character escape sequences

    Syntax: <ESC>P

    in which P defines the operation to be performed and terminates the escape sequence. It is any character between ‘0’ and ‘~’ (decimal 48 to 126, hexadecimal 30 to 7E).

  2. Parameterised escape sequence

    Syntax: <ESC>P[g#p1#p2#p3...#T[data]]

    • P represents a parameterised escape sequence. The parameters must be included because they further define the action to be performed.

    • g is the group character. It defines the group type of control being performed and is used with commands that require additional parameters.

    • # stands for the value field and specifies a numeric value between -32768 and 32768 (default value is 0).

    • p1p2p3... is the parameter character. It defines the parameter to which the previous value field applies, and it indicates that more parameters follow.

    • T is the termination. It specifies the parameter to which the value field applies and terminates the escape sequence.

    • When data is required by the command, the value field indicates the number of bytes of 8-bit binary data to be sent to the printer. The [data] immediately follows the terminating character of the escape sequence.

    NOTE

    Groups of similar escape sequences — i.e. escape sequences that have the same first two characters — can be combined into a single escape sequence.

Entering PCL mode

Upon entering PCL6 emulation, you automatically enter the PCL mode. The data is scanned. In case no PCL-XL header or PJL header is detected, the PCL5e interpreter is entered.