CG Times (based upon Times New Roman), CG Triumvirate, MicroType, and TrueType
are trademarks of the AGFA Monotype Corporation.
PCL, Intellifont, and HP Laser JetII are trademarks of the Hewlett Packard Corporation.
Macintosh is a trademark of the Apple Corporation.
Windows is a trademark of the Microsoft Corporation.
All other brand and product names are trademarks, service marks, registered
trademarks, or registered service marks of their respective companies.
Information in this manual is subject to change without notice and does not represent a
commitment on the part of Datamax-O’Neil Corporation. No part of this manual may be
reproduced or transmitted in any form or by any means, for any purpose other than the
purchaser’s personal use, without the expressed written permission of Datamax-O’Neil
Corporation..
Hex Transfer Method ................................................................................48
i Thermal Printer Programmer’s Guide
Table of Contents
2. Appendix A
Printer Model Printable Print Widths ...................................................51
3. Appendix B
Printer Model Speed ...........................................................................53
Thermal Printer Programmer’s Guide
1Programmer’s Guide
Overview
This Programmer’s Guide provides information about printer specific commands that are
supported by the following printer(s):
•p1115
•p1120n
•p1125
•p1115s
•p1725
•w1110
The Datamax-O'Neil Performance & Workstation Series printers language is based on
Hewlett Packard
barcode printing, Datamax-O'Neil has extended the language by adding barcode specific
commands. Methods exist to print barcodes in a Windows® environment without using
these new commands. Examples include using commercially available barcode fonts or
label design packages.
®
PCL 5e. Because this language does not have native support for
Scope
This document describes Datamax-O'Neil PCL barcode commands, internal variable
commands and various commands specific to thermal print devices. . Knowledge of PCL
is helpful but not required. A full explanation of PCL is beyond the scope of this guide,
please refer to the reference documents listed below.
Referenced Documents
The following documents referenced herein shall apply unless otherwise superseded by
requirements specified elsewhere in this document.
CG Triumvirate is a trademark of Monotype Imaging Inc.
CG Times, a product of Monotype Imaging Inc., is based on Times New Roman, a U.S.
registered trademark of Monotype Corporation plc.
PCL is a U.S. registered trademarks of Hewlett-Packard Company.
1Thermal Printer Programmer’s Guide
1 | Programmer’s Guide
Microsoft, Windows, and MS-DOS are U.S. registered trademarks of Microsoft
Corporation.
TrueType is a registered trademark of Apple Computer, Inc.
Helvetica and Times Roman are trademarks of Linotype AG and its subsidiaries.
Univers is a U.S. registered trademark of Linotype AG and its subsidiaries.
Antique Olive is a trademark of Monsieur Marcel OLIVE.
Arial is a registered trademark of The Monotype Corporation plc.
Thermal Printer Programmer’s Guide2
Programmer’s Guide | 1
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 twocharacter 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)SymbolPurpose
0x21!Reserved by D-O for debug firmware
0x22“Not Used
0x23#Not Used
0x24$D-O Barcode Parameter
3Thermal Printer Programmer’s Guide
1 | Programmer’s Guide
Character (X)SymbolPurpose
0x25%PCL Language Parameter
0x26&PCL Cursor Parameter
0x27‘Not Used
0x28(PCL Font Parameter
0x29)PCL Font Parameter
0x2A*PCL Graphic Parameter
0x2B+Not Used
0x2C,Not Used
0x2D-Not Used
0x2E.Not Used
0x2F/Not USed
The value field ‘#’ is a group of characters specifying a numeric value. The value is an
ASCII string of characters within the range 0x30 – 0x39. The string may be preceded
with an optional ‘+’ or ‘-‘ sign and may contain a decimal portion separated by the
decimal point. Consider the following example:
<ESC>&l5.81C
This command will set the printer to print 33 lines per label on a 4 inch high label. The
value specified is the number of 1/48 inch increments between rows (5.81 = 4/33 x 48).
The parameter character is any character from the ASCII table within the range of 0x60 –
0x7E. This character specifies the parameter to which the previous value field applies.
This character is used when combining escape sequences as described below in the
section titled “Combining Escape Sequences.”
The Termination Character is any character from the ASCII table within the range 0x40 –
0x5E. This character specifies the parameter to which the previous value field applies.
This character terminates the escape sequence.
The Binary Data is eight-bit data (for example, graphics data, downloaded fonts, etc.).
The number of bytes of binary data is specified by the value field of the escape
sequence. Binary data immediately follows the terminating character of the escape
sequence. Data that is to be encoded into barcode images will be considered as binary
data.
Combining Escape Sequences
All escape sequences that have the same first two characters AFTER the “<ESC>” (the
parameterized and group character) can be combined into a single escape sequence.
For example, the three commands (each begins with the <ESC> character) are of the
type “EC&l”.
Thermal Printer Programmer’s Guide4
Programmer’s Guide | 1
The following:
<ESC>&l1O<ESC>&l2A <ESC>&l5.81C
can be combined into the following single escape sequence:
<ESC>&l1o2a5.81C
In the example above, the capital ‘O’ becomes a lower case ‘o’, the ‘A’ of the second
command becomes an ‘a’ and the ‘EC&l’ are dropped from the second and third
commands. The printer commands are performed in the order they are combined, from
left to right.
Barcode Clipping
PCL normally clips print objects at the dot level on the logical page boundary. Barcodes
clipped in this manner can easily go undetected. Because of this, any portion of a
barcode that falls beyond the boundaries of the logical print area will be dropped and a
shaded rectangle will be printed, inscribing the area within the logical print page where
the barcode would have been. This will provide visual evidence to the user the barcode
has been clipped and is therefore invalid.
Barcodes that are not generated internally by the printer will not be clipped in this
manner and may not be readable by scanning devices.
Cursor Positioning Commands
The PCL cursor refers to the Current Active Position (CAP) which identifies the current
position on the label where a print command begins laying out page data. The cursor can
be moved anywhere within the logical page using a combination of the horizontal and
vertical cursor position commands and control codes. Although there are many different
ways to move the cursor, there are three types of cursor positioning units. These include
PCL Units, Decipoints, and Row/Column units.
The size of a PCL unit is determined by the value specified by the Unit of Measure
command. The format of this command is <ESC>&u#D where # is the number of units
per inch. The “units per inch” value is a discrete value from the following set of values:
{96, 100, 120, 144, 150, 160, 180, 200, 225, 240, 288, 300, 360, 400, 450, 480, 600,
720, 800, 900, 1200, 1440, 1800, 2400, 3600, and 7200}. If the Unit of Measure is not
set, the default value is 300.
A decipoint, in PCL terminology, is 1/720 inch or one-tenth of a PCL point. A PCL point is
exactly 1/72 inch as opposed to a typographic point which is approximately 1/72 inch.
Decipoints are resolution independent. Labels that are designed using units of decipoints
will be resolution independent and are therefore easily portable across PCL printers of
different resolutions. This is the preferred unit of measure in label design.
Cursor Positioning after Printing Barcode
PCL has a procedure for cursor positioning after printing a text character. Set the Current
Active Position (CAP) to the right at a distance equal to the width of that character, ready
5Thermal Printer Programmer’s Guide
1 | Programmer’s Guide
for the next character to be rendered. With raster images, the CAP is moved vertically to
the next dot row below the raster image previously rendered and then returned to the
horizontal start position of the raster image. The terminus CAP of the barcode is
selectable with the commands described below.
Set the Current Active Position (CAP) to the right of the last printed text character at a
distance equal to the width of that character so the next character can be rendered. With
raster images, the CAP is moved vertically to the next dot row below the previously
rendered raster image and returned to the horizontal start position of the raster image.
The terminus CAP of the barcode is selectable with the commands described below.
Orientation and the Influence on Label Dimensions
HP PCL defines the portrait orientation to be the page configuration where the X
dimension moves to the left along the short edge of the paper and the Y dimension
moves downward along the long edge of the paper. This seems perfectly reasonable
until both the label stock and the arbitrary dimensions a label may have on a given roll of
media are considered. As an example, for the common label stock size of 4” by 6”, it is
obvious the label is in the portrait orientation. For 4” by 3” label stock, HP PCL regards
this label as being in the landscape orientation and will automatically rotate the text,
images, rules, and coordinates by 90 degrees to maintain the portrait orientation with
respect to the shorter distance on the side. This may not be what an experienced user of
thermal printers would expect to see. In order for the same image to be produced on a
shorter label, the printer must be programed to produce the image in the landscape
orientation. Orientation takes precedence over label dimensions. If the printer is in the
portrait orientation, HP PCL will rotate the image to align it to the short edge of the label.
This subtle design characteristic may cause problems with users of legacy label printers
therefore we have chosen to modify this behavior to be more in-line with thermal printers.
Fonts and Symbol Sets Supported
Resident Scalable Fonts
The table below provides a list of the 53 resident scalable fonts and the escape
sequence needed to select that font as the current primary font. The <ESC> tag
represents the escape character 0x1B. The <symset> tag represents the symbol set to
use with the selected font (see section 13 below). The <ptsize> tag represents the
requested point size of the font, up to two decimal places. The <pitch> tag represents
horizontal spacing of a fixed pitch font in characters per inch.
Refer to the Symbol Set Mapping Table resident symbol sets. The tags must be replaced
with their appropriate values. Developers may choose to define their own symbol sets.
Note: The resident fonts for your printer may vary in number from those listed in this
table.
Thermal Printer Programmer’s Guide6
Programmer’s Guide | 1
Table 2: Fonts and Escape Sequences
Font NameEscape Sequence
Albertus Medium<ESC>(<symset><ESC>(s1p<ptsize>v0s1b4362T
Albertus Extra Bold<ESC>(<symset><ESC>(s1p<ptsize>v0s4b4362T
Symbol sets are used to map character codes to the associated character image. The
most familiar symbol set is the ASCII character mapping for characters occupying the
character codes ranging from 0x20, which is the space character, through 0x7E, which is
the tilde ‘~’ character. These symbol sets are used to support the internationalization of
labels.
Table 3: Symbol Sets
PCL
Symbol Set
10UPC8PC-8PC-8
8UROMAN8Roman-8Roman-8
PJL Symbol
Name
Control
Panel Name
Symbol Set Description
4UROMAN9Roman-9Roman-9
0NISOL1ISO-L1ISO 8859-1 Latin 1
2NISOL2ISO-L2ISO 8859-2 Latin 2
4NISOL4ISO-L4ISO 8859-4 Latin 4
5NISOL5ISO-L5ISO 8859-9 Latin 5
Thermal Printer Programmer’s Guide8
Programmer’s Guide | 1
PCL
Symbol Set
6NISOL6ISO-L6ISO 8859-10 Latin 6
9NISOL9ISO-L9ISO 8859-15 Latin 9
26UPC775PC-775PC-775
5MPSMATHPS MATHPS-Math
8MMATH8MATH-8Math-8
15UPIFONTIP FONTPi Font
6JMSPUBLMS PUBLMicrosoft Publishing
11UPC8DNPC-8 DNPC-8 Danish/Norwegian
12UPC850PC-850PC-850 Multilingual
17UPC852PC-852PC-852
13UPC858PC-858PC-858 Multilingual
9TPC8TKPC-8 TKPC-Turkish
9JPC1004PC-1004PC-1004
19UWINL1WIN L1Windows CP1252 Latin 1
9EWINL2WIN L2Windows CP1250 Latin 2
PJL Symbol
Name
Control
Panel Name
Symbol Set Description
5TWINL5WIN L5Windows CP1254 Latin 5
19LWINBALTWINBALTWindows CP1257 Baltic
7JDESKTOPDESKTOPDesktop
10JPSTEXTPS TEXTPS Text
1ULEGALLEGALLegal
1EISO4ISO-4United Kingdom Code Set
0UISO6ISO-67 Bit ASCII Code Set
0SISO11ISO-117 Bit Western Europe (Swedish)
0IISO15ISO-157 Bit Western Europe (Italian)
2SISO17ISO-177 Bit Western Europe (Spanish)
1GISO21ISO-217 Bit Western (German)
0DISO60ISO-607 Bit Western Europe (Norwegian)
1FISO69ISO-697 Bit Western Europe (French)
9UWIN30WIN 3.0Windows CP1252 (obsolete)
12JMCTEXTMC TEXTMC Text
18NUCS2UCS-2Unicode 2 Byte Encoding
0EROMANEXTRomanExtRoman Extensions
579LWINGDINGSWindDingsWingdings Font
14LZAPDINGBATSZapDingBatsWindows Dingbats Font
9Thermal Printer Programmer’s Guide
1 | Programmer’s Guide
12U
PC85
PCL
Symbol Set
19MSYMBOLSymbolSymbol Font
PJL Symbol
Name
Control
Panel Name
Symbol Set Description
The table below (PC-850 Symbol Set) is an example of character code mapping and the
character image associated with that code.
Figure: 1 - 1 PC-850 Symbol Set
Thermal Printer Programmer’s Guide10
Programmer’s Guide | 1
Printing Unicode Characters in PCL
To print Unicode characters, the symbol set 18N (UCS-2) should be used to set handling
to Unicode mapping together with UTF-8 text parsing method. Refer to the following
syntax:
<ESC>&t83P<ESC>(18N<ESC>(sn1Tdata …
The 83P in <ESC>&t command signifies the UTF-8 text parsing method. The 18N in
<ESC>( command sets the Unicode mode. The n1T is used to select a font in the
<ESC>(s command where n1 is the typeface id of the font. Immediately following are the
characters to print in UTF-8 format. Refer to the example below:
This prints the characters “ض α?강萁“ (an Arabic, Greek, Thai, Korean and Chinese
symbol) assuming the font supports all of these characters. The font selection command
parameters are “1p” for proportional spacing, “16v” for point size of 16, “0s” for no italic,
“0b” for no bold and “9999T” for typeface ID.
Datamax-O'Neil Barcode Command Structure
Command Structure Syntax
As stated earlier, printer commands are performed in the order that they are combined,
from left to right. There are several barcode parameters that are only relevant to a subset
of the total number of barcodes provided.
All Datamax-O'Neil barcodes and their support parameters will begin with the following
sequence:
<ESC>$b... 0x1b 0x24 0x62
There are several escape commands associated with barcodes. Any escape command
that modifies a property of a barcode will only affect the currently selected barcode. For a
label design with multiple barcode types, modification of one or more barcode properties
does not affect the properties of any other barcode type.
The following commands illustrate how one might handle modifying the default
parameters for multiple barcode types on a single label. Note that the examples below
have line numbers. For ease of reading each line is separated by a carriage return and
line feed. When sending this data to the printer, all the lines in the examples should NOT
have a carriage return and line feed except where you see the symbol “CRLF”. The
“CRLF” symbol indicates a carriage return/line feed combination should be inserted into
the data stream. The “<ESC>” symbol indicates the escape character (hex value 0x1B)
should be inserted into the data stream.
11Thermal Printer Programmer’s Guide
1 | Programmer’s Guide
Table 4: Example of Printing Barcodes (Compressed Commands)
CommandsDescription
<ESC>%-12345X@PJL SET RESOLUTION =
CRL
300
@PJL SET PAPERWIDTH=2880
@PJL SET PAPERLENGTH=2880
@PJL ENTER LANGUAGE = PCL
F
CRL
F
CRL
F
CRL
F
Reset the printer and enter into PJL mode, Set the
resolution to 300 DPI
Set the label width to 2880 decipoints (4 inches)
Set the label length to 2880 decipoints (4 inches)
Select the PCL emulation
<ESC>&a2160h720v270PSet the horizontal cursor position at 2160
decipoints (3 inches) and the vertical cursor
position at 720 decipoints (1 inch) and set the
writing direction at 270 degrees counter clockwise
from horizontal (down the label).
<ESC>$b1030c360h2a10W9876543210
Select barcode 1030 (Code 128 w/ Auto select).
Set the barcode height of this barcode to 360
decipoints and enable autoprint w/ checksum
(human readable). With the currently selected
barcode (1030), print the data 9876543210 (10
bytes of data)
<ESC>&a0p720h540VSet the writing direction to 0 degrees, the horizontal
cursor position at 720 decipoints horizontally (1
inch) and 540 decipoints vertically (¾ inch).
<ESC>$b1061c360h0a10W1234567890 Select barcode 1061 (Interleave 2 of 5 w/ Bearer
Bars), the height of the barcode to 360 decipoints
(1/2 inch), no autoprint and print the following 10
bytes: 1234567890
<ESC>EReset PCL (this causes any imaged data to be
printed)
<ESC>%-12345XReset the printer and wait for more PJL commands
Table 5: Example of printing Barcodes (Uncompressed Commands
CommandsDescriptions
<ESC>%-12345X@PJL SET RESOLUTION =
CRL
300
@PJL SET PAPERWIDTH=2880
@PJL SET PAPERLENGTH=2880
@PJL ENTER LANGUAGE = PCL
F
CRL
F
CRL
F
CRL
F
<ESC>&a2160HSet the horizontal cursor position to 2160
<ESC>&720V
Reset the printer and enter PJL mode
Set the label width to 2880 decipoints (4 inches)
Set the label length to 2880 decipoints (4 inches)
Select the PCL emulation
decipoints
Set the vertical cursor position to 720 decipoints
Thermal Printer Programmer’s Guide12
Loading...
+ 41 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.