Programmer's Guide User guide

Programmer’s Guide | 1
3 Thermal Printer Programmer’s Guide
Datamax-O'Neil Commands
There are frequent references to Hewlett Packard’s (HP) PCL Technical Reference
Manual (TRM). This document can be found on HP’s website listed in the Referenced
Documents above. Datamax-O'Neil provides unique commands not within the command
set found in the HP’s PCL TRM. No command defined within this document supersedes
or negates any commands found within the PCL TRM. This does not imply that all
commands defined within the PCL TRM are implemented by the Datamax-O'Neil
Barcode Label Printers. Many commands found within the PCL TRM are irrelevant within
the context of the Barcode Label Printer. Examples of these are commands for selecting
discrete pages sizes such as Letter, Legal, A4, and Executive. Features such as
duplexing and stapling do not currently exist in D-O Barcode Printers and these
commands, if found within the data stream, are silently ignored without error.
PCL Language
PCL Command Structure
General Information
As per Hewlett Packard’s specification on the syntax of escape sequences, there are two
forms of PCL escape sequences: two-character escape sequences and parameterized
escape sequences.
Two character escape sequences have the following form:
<ESC>X
“X” is a character that defines the operation to be performed. Two examples of two-
character escape sequences are <ESC>E and <ESC>9. The first example resets the
printer to default conditions and the second resets the left and right margins to their
default value. The value of “X” may be any character within the range 0x30 – 0x7E.
Parameterized escape sequences have the following form:
<ESC>X y z1 [+|-]#[.#] z2 [+|-]#[.#] z3 … [+|-]#[.#] Zn[data]
The following characters y, #, zi and data may be optional. The parameterized character
X is within the range of 0x21 – 0x2F. The group character “y” is within the range of 0x60
– 0x7E. Group characters specify the type of control being performed.
Table 1: Parameterized Character <ESC> X...
Character (X) Symbol Purpose
0x21 ! Reserved by D-O for debug firmware
0x22 Not Used
0x23 # Not Used
0x24 $ D-O Barcode Parameter