Every effort has been made to ensure that the information in this document is complete,
accurate, and up-to-date. The manufacturer assumes no responsibility for the results of
errors beyond its control. The manufacturer also cannot guarantee that changes in software
and equipment made by other manufacturers and referred to in this guide will not affect
the applicability of the information in it. Mention of software products manufactured by
other companies does not necessarily constitute endorsement by the manufacturer.
While all reasonable efforts have been made to make this document as accurate and helpful
as possible, we make no warranty of any kind, expressed or implied, as to the accuracy or
completeness of the information contained herein.
NOTE
A note provides additional information to supplement the main text.
CAUTION!
A caution provides additional information which, if ignored, may
result in equipment malfunction or damage.
WARNING!
A warning provides additional information which, if ignored, may
result in a risk of personal injury.
Specifications subject to change without notice. All trademarks acknowledged.
Notes, cautions and warnings > 4
Page 5
I
NTRODUCTION
This manual describes your printer's built in barcode printing feature. It is a technical
manual for systems integrators with a working knowledge of the PCL5e page description
language and of barcode schemes in general.
NOTE
The barcode illustrations in this manual are NOT genuine barcodes. They are
illustrations only, and cannot be read correctly by standard barcode readers.
The barcode printing feature uses special PCL5e font selection code sequences to generate
scalable, configured barcodes in a range of sizes, with automatic generation of check
characters upon request.
Barcodes are generated graphically rather than using special barcode fonts. This provides
better support for bar thickness, wide-to-narrow ratios, check digits and a wider range of
bar coding schemes than is possible with bar coding fonts.
The barcode printing feature supports the range of one-dimensional barcodes listed in the
following table.
BARCODESUPPORT FORMAT DETAIL
UPC–AUPC–A
UPC–A +2
UPC–A +5
UPC–EUPC–E (UPC–E0, UPC–E1)
UPC–E +2
UPC–E +5
EAN/JAN–8EAN/JAN–8
EAN/JAN–8 +2
EAN/JAN–8 +5
EAN/JAN–13EAN/JAN–13
EAN/JAN–13 +2
EAN/JAN–13+5
Interleaved 2of5Interleaved 2of5 (ITF)
Interleaved 2of5 +CHK
Code39Code39
Code39 +CHK
Code128Code128 autoswitch
Code128 A
Code128 B
Code128 C
EAN/UCC–128EAN/UCC–128
CODABARCODABAR
CODABAR +CHKmod16
ZIP+4 POSTNETZIP+4 POSTNET 5
ZIP+4 POSTNET 9
ZIP+4 POSTNET 11
Introduction > 5
Page 6
H
OW TO USE
Barcode printing is generated by inserting special extended PCL5e commands into the data
stream. Once the required escape sequence has been received the printer will interpret the
following characters as barcode data until it receives a command that specifies the next
primary font for text printing.
After the barcode parameters have been selected, following text data is gathered for
processing the barcode image. The end of barcode data will be determined by the barcode
type, but in general it is indicated by CR/LF/FF/<Escape code>.
When the full sequence of text data to be printed as a barcode has been received, it is
analysed to ensure that it conforms to the correct number of characters and range of
character values for the specified barcode type. If not, an error code is printed.
P
RINTING SPECIAL CHARACTERS
If you need to print special characters (0x00~0x1F) as barcode data, the Transparent Print
Data command must immediately follow the font selection sequence. This command is:
<ESC>&p#X
where the number # specifies the number of following data bytes.
D
ATA COMPRESSION
Once the barcode data has been received and verified, it is compressed if necessary. Where
the barcode type prints compressed data the barcode printing feature allows the code to
be precompressed (6 characters input) or uncompressed (10 or 11 characters input). If
uncompressed data is sent but the barcode type requires it to be compressed, then the
compression is performed automatically.
How to use > 6
Page 7
A
UTOMATIC CHARACTERS
Generally, check digit, start/stop bars and left/centre/right guard are calculated and added
automatically as needed. Characters added automatically are not included in the table of
valid codes, refer to “Valid character codes” on page 8. However, for CODABAR and
CODABAR +CHKmod16, they can be selected from a, b, c and d (0x61~0x64). These must
be sent as barcode data and are included in the number of character codes.
C
URSOR START POSITION
In barcode printing, the cursor position at the time the barcode data is sent is at the lower
left point of the leading bar. Since characters of barcode types UPC-A, UPC-E and EAN/JAN13 are laid out to the left of the cursor position at start of printing, the cursor position must
first be set taking any print margin into account.
A
CTIVATING BARCODE PRINT MODE
To activate barcode printing mode an escape <ESC> sequence is sent in the following form:
<ESC> ( s # p # h # v # b # s # T
NOTE
In this manual the term <ESC> refers to the escape character (0x1B).
Six font selection parameters are used: p, h, v, b, s, T. All parameters are sent as indicated
above in a single escape sequence command. Parameters with default values may be
omitted if desired, but the T parameter must always be present to select the barcode type.
Refer to “Default parameter values” on page 12.
The following table summarises the use of each parameter.
PARAMETERFUNCTION
pDetermines if and how text is printed with the
hSpecifies the font used for human readable text if
vSpecifies the height of the barcode in points. (1pt =
bSpecifies the width of black bars. Up to four values
sSpecifies the width of white bars. Up to four values
TSpecifies the barcode type. (See “T-parameter” on
barcode. (See “P-parameter” on page 10.)
printed. (See “H-parameter” on page 11.)
1/72 inch.) (See “V-parameter” on page 11.)
can be given. (See “B-parameter” on page 11.)
can be given. (See “S-parameter” on page 12.)
page 9.)
How to use > 7
Page 8
V
ALID CHARACTER CODES
Valid character codes for each barcode type are listed in the following table.
Variable, max. 150. Lower
case alphabetic
(0x61~0x64) for Start/
Stop included.
ZIP+4 POSTNET 5 / 9 / 110x2D, 0x30~0x3A,
0x41~0x4A
Valid character codes > 8
5 / 9/ 11 characters.
Page 9
P
ARAMETER DETAIL
As stated earlier, barcode printing is activated with the following escape sequence:
<ESC> ( s # p # h # v # b # s # T
This section describes the use of each of the six parameters of this command.
T-
PARAMETER
This parameter selects the barcode type to use. It must always be present. If not, or the
parameter value does not match one of the values in the following table, it is treated as the
primary font’s font specification.
VALUEBARCODEVALUEBARCODE
24600UPC–A24641Interleaved 2of5 +CHK
24601UPC–A +224670Code39
24602UPC–A +524671Code39 +CHK
24610UPC–E (E0, E1)24700Code128 autoswitch
24611UPC–E +224701Code128 A
24612UPC–E +524702Code128 B
24620EAN/JAN–824704Code128 C
24621EAN/JAN–8 +224720EAN/UCC–128
24622EAN/JAN–8 +524750CODABAR
24630EAN/JAN–1324751CODABAR +CHKmod16
24631EAN/JAN–13 +224770ZIP+4 POSTNET 5
24632EAN/JAN–13 +524771ZIP+4 POSTNET 9
24640Interleaved 2of5 (ITF)24772ZIP+4 POSTNET 11
Parameter detail > 9
Page 10
P-
PARAMETER
Specifies if and how to print human readable (text) characters. If this parameter is omitted
or invalid, its default value is assumed. Refer to “Default parameter values” on page 12.
VALUEPRINT IMAGEPRINT METHOD
0Use default setting. See “Default
parameter values” on page 12.
1Text not printed.
2Text embedded in bottom of
barcode.
3Text half embedded in barcode.
4Text below barcode.
5Text above barcode.
For barcodes that do not have human readable characters this parameter is ignored.
For Code39 / +CHK, if 10 is added (# = 10~15), Start/Stop bar characters (*) are printed
as human readable characters.
#=13
For UPC–A / +2 / +5 and UPC–E / +2 / +5, if 100 is added (# = 100~105), the added
character and check character are printed in 4/7 size of the other human readable
characters.
For Interleaved 2of5 +CHK, Code39 +CHK, Code128, EAN/UCC–128 and CODAR
+CHKmod16, if 100 is added (# = 100@105), the check digit is printed as a human
readable character.
Parameter detail > 10
Page 11
H-
PARAMETER
Specifies a font for human readable characters. If this parameter is omitted or invalid, the
printer functions with its default value. Refer to “Default parameter values” on page 12.
VALUEFONT USED
0Courier Bold (default)
1Letter Gothic Bold
2Univers Bold
3Univers Condensed Bold
4CG-Times Bold
100~104Medium weight versions of 0~4.
105OCR–B
200~204Italic versions of 0~4.
300~304Same fonts as 0~4.
400~404Bold Italic versions of 0~4.
If the selected font is not available, the default is used.
V-
PARAMETER
Specifies the height of a bar in points. (1pt = 1/72 inch.) If the parameter is omitted or
invalid, the default value is assumed. Refer to “Default parameter values” on page 12.
VALUEBAR HEIGHT (POINTS)
<3Default value is used.
3~10003~1000pt
>10001000pt
The sign and decimal part of the value supplied are ignored.
B-
PARAMETER
Specifies the width of (black) bars in units of 1/600 inch. Up to four values may be
specified, separated by commas. In barcodes having only two bar widths the third and
fourth values are ignored. If the parameter is omitted, the default value is assumed. Refer
to “Default parameter values” on page 12.
PARAMETERFUNCTION
#1Width of thinnest bar.
#2Width of second thinnest bar.
#3Width of third thinnest bar.
#4Width of widest bar.
If values are invalid or 0, the default value is assumed. Sign and decimal parts are ignored.
In barcodes that have only two bar widths, the specifications of #3 and #4 are ignored.
For barcodes with fixed bar width this parameter is ignored.
When changing the bar width with this command, the bar width ratios should be the same
or close to the default width ratio.
Parameter detail > 11
Page 12
For an illustration of how to insert these parameters see “Data for UPC–A barcode printing
(example 2)” on page 14.
S-
PARAMETER
Specifies the width of spaces (white bars) in units of 1/600 inch. Usage is exactly the same
as for the B-parameter. Refer to “B-parameter” on page 11.
D
EFAULT PARAMETER VALUES
If parameters are omitted or invalid their default values are assumed. These vary
depending on the barcode type selected with the T-parameter. Default values for each
barcode type are listed in the following table.
BARCODEPVB/S
#1#2#3#4
UPC–A3 748 162432
UPC–E3 298 162432
EAN/JAN–83 508 163432
EAN/JAN–133748162432
Interleaved 2of5129618––
Code39129618––
Code1281296121824
EAN/UCC–1281296121824
CODABAR129618––
ZIP+4 POSTNET***–––
* For ZIP+4 POSTNET no human readable text is printed, and bar width and height are fixed. These items
do not therefore require parameters. If supplied, they are ignored.
Parameter detail > 12
Page 13
C
OMMAND SEQUENCE
The command sequence for barcode printing is the same as for printing text after specifying
the font.
When printing text, commands are arranged in the following order:
In this example only the T-parameter is used. All others have been omitted and therefore
print with their default values. Since the chosen barcode is UPC–A, it is an 11-digit number
beginning with the added character “o”.
The sequence is:
Construction is as follows:
UPC–A
<ESC>(s24600T<ESC>*p#x#Y01234567890
BARCODE PRINTING (EXAMPLE
COMMANDCOMMAND DETAIL
UPC–A
barcode
Print position<ESC>*p#x#Y
<ESC>(s24600T
1)
Barcode data01234567890
Command sequence > 13
Page 14
D
ATA FOR
UPC–A
BARCODE PRINTING (EXAMPLE
2)
In this example all parameters have been supplied, although for simplicity their default
values are specified here.