Programmer's Guide User guide

1 | Programmer’s Guide
Thermal Printer Programmer’s Guide 12
Table 4: Example of Printing Barcodes (Compressed Commands)
Table 5: Example of printing Barcodes (Uncompressed Commands
Commands Description
<ESC>%-12345X@PJL SET RESOLUTION =
300
C
R
L
F
Reset the printer and enter into PJL mode, Set the
resolution to 300 DPI
@PJL SET PAPERWIDTH=2880
C
R
L
F
Set the label width to 2880 decipoints (4 inches)
@PJL SET PAPERLENGTH=2880
C
R
L
F
Set the label length to 2880 decipoints (4 inches)
@PJL ENTER LANGUAGE = PCL
C
R
L
F
Select the PCL emulation
<ESC>&a2160h720v270P Set 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>&a0p720h540V Set 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>E Reset PCL (this causes any imaged data to be
printed)
<ESC>%-12345X Reset the printer and wait for more PJL commands
Commands Descriptions
<ESC>%-12345X@PJL SET RESOLUTION =
300
C
R
L
F
Reset the printer and enter PJL mode
@PJL SET PAPERWIDTH=2880
C
R
L
F
Set the label width to 2880 decipoints (4 inches)
@PJL SET PAPERLENGTH=2880
C
R
L
F
Set the label length to 2880 decipoints (4 inches)
@PJL ENTER LANGUAGE = PCL
C
R
L
F
Select the PCL emulation
<ESC>&a2160H Set the horizontal cursor position to 2160
decipoints
<ESC>&720V
Set the vertical cursor position to 720 decipoints