This reference guide provides information for barcode printing that uses control commands sent directly to a
Brother printing device.
Applicable Brother printing devices:
Brother’s HL, MFC and DCP models which are equipped with HP LaserJet (PCL) emulation mode.
If your Brother printing device supports HP LaserJet emulation mode, you can print barcodes in HP LaserJet
emulation mode, Epson FX-850 emulation mode and IBM proprinter FX emulation mode.
Available emulation modes depend on the model number of your printing device. To determine what
emulation mode is supported, see the specification section of that particular printing device’s User's Guide.
1
2
Quick reference for barcode control
2
commands
Print barcodes or expanded characters2
CodeESC i
Dec27 105
Hex1B 69
Format: ESC i n ... n \
Creates barcodes or expanded characters according to the segment of parameters ‘n ... n’. For more
information about parameters, see the following Definition of Parameters. This command must end with the
‘ \ ’ code (5CH).
Definition of parameters2
This barcode command can have the following parameters in the parameter segment (n ... n). As parameters
are effective within the single command syntax ESC i n ... n \, they do not apply in the barcode commands.
If certain parameters are not given, they take the preset settings. The last parameter must be the barcode
data start (‘b’ or ‘B’) or the expanded character data start (‘l’ or ‘L’). Other parameters can be given in any
sequence. Each parameter can start with a lower-case or upper-case character, for example, ‘t0’ or ‘T0’, ‘s3’
or ‘S3’ and so one.
2
Barcode mode2
n = ‘t0’ or ‘T0’CODE 39 (default)
n = ‘t1’ or ‘T1’Interleaved 2 of 5
n = ‘t3’ or ‘T3’FIM (US-Post Net)
n = ‘t4’ or ‘T4’Post Net (US-Post Net)
n = ‘t5’ or ‘T5’EAN 8, EAN 13, or UPC A
n = ‘t6’ or ‘T6’UPC E
n = ‘t9’ or ‘T9’Codabar
n = ‘t12’ or ‘T12’Code 128 set A
n = ‘t13’ or ‘T13’Code 128 set B
n = ‘t14’ or ‘T14’Code 128 set C
n = ‘t130’ or ‘T130’ISBN (EAN)
n = ‘t131’ or ‘T131’ISBN (UPC-E)
n = ‘t132’ or ‘T132’EAN 128 set A
n = ‘t133’ or ‘T133’EAN 128 set B
n = ‘t134’ or ‘T134’EAN 128 set C
This parameter selects the barcode mode as shown above. When n is ‘t5’ or ‘T5’ the barcode mode (EAN 8,
EAN 13, or UPC A) varies according to the number of characters in the data.
2
Quick reference for barcode control commands
2
Barcode, expanded character, line block drawing and box drawing2
n = ‘s0’ or ‘S0’3: 1 (default)
n = ‘s1’ or ‘S1’2: 1
n = ‘s3’ or ‘S3’2.5: 1
This parameter chooses the barcode style as above. When the EAN 8, EAN 13, UPC-A, Code 128 or EAN
128 barcode mode is chosen, this barcode style parameter is ignored.
Expanded Character
‘S’
0 = White
1 = Black
2 = Vertical stripes
3 = Horizontal stripes
4 = Cross hatch
For example ‘S’ n1 n2
n1 = Background fill pattern
n2 = Foreground fill pattern
If ‘S’ is followed by only one parameter, the parameter is a foreground fill pattern.
Line block drawing & box drawing
‘S’
1 = Black
2 = Vertical stripes
3 = Horizontal stripes
4 = Cross hatch
Barcode 2
n = ‘mnnn’ or ‘Mnnn’ (nnn = 0 ~ 32767)
This parameter shows the barcode width. The unit of ‘nnn’ is a percentage.
3
Quick reference for barcode control commands
2
Barcode human readable line ON or OFF2
n = ‘r0’ or ‘R0Human readable line OFF
n = ‘r1’ or ‘R1Human readable line ON
Preset:Human readable line ON
(1) ‘T5’ or ‘t5’
(2) ‘T6’ or ‘t6’
(3) ‘T130’ or ‘t130’
(4) ‘T131’ or ‘t131’
Preset:Human readable line OFF
All others
This parameter shows whether the machine prints the human readable line below the barcode. Human
readable characters are always printed with OCR-B font of 10 pitch and all the current character style
enhancements are masked. The default setting is determined by the barcode mode selected by ‘t’ or ‘T’.
Quiet zone2
n = ‘onnn’ or ‘Onnn’ (nnn = 0 ~ 32767)
Quiet zone is the space on both sides of the barcodes. Its width can be shown using the units that are set by
the ‘u’ or ‘U’ parameter. (For the description of ‘u' or ‘U' parameter, see the next section.) The default setting
of the quiet-zone width is 1 inch.
Barcode, expanded character unit, line block drawing and box drawing2
n = ‘u0’ or ‘U0’mm (preset)
n = ‘u1’ or ‘U1’1/10
n = ‘u2’ or ‘U2’1/100
n = ‘u3’ or ‘U3’1/12
n = ‘u4’ or ‘U4’1/120
n = ‘u5’ or ‘U5’1/10 mm
n = ‘u6’ or ‘U6’1/300
n = ‘u7’ or ‘U7’1/720
This parameter shows the measurement units of X-axis offset, Y-axis offset, and barcode height.
4
Quick reference for barcode control commands
2
Barcode, expanded character, line block drawing and box drawing offset in
X-axis2
n = ‘xnnn’ or ‘Xnnn’
This parameter shows the offset from the left margin in the ‘u’- or ‘U’-specified unit.
Barcode & expanded character offset in Y-axis2
n = ‘ynnn’ or ‘Ynnn’
This parameter shows the downward offset from the current print position in the ‘u’- or ‘U’-specified unit.
Barcode, expanded character, line block drawing and box drawing height2
n = ‘hnnn’, ‘Hnnn’, ‘dnnn’, or ‘Dnnn’
1 EAN13, EAN8, UPC-A, ISBN (EAN13, EAN8, UPC-A), ISBN (UPC-E): 22 mm
2UPC-E: 18mm
3 Others: 12 mm
Expanded characters i 2.2 mm (preset)
Line block drawing and box drawing i 1 dot
This parameter shows the height of barcodes or expanded characters as shown above. It can start with ‘h’,
‘H’, ‘d’, or ‘D’. The height of barcodes is shown in the ‘u’- or ‘U’-specified unit. The default setting of the
barcode height (12 mm, 18 mm or 22 mm) is determined by the barcode mode selected by ‘t’ or ‘T’.
Expanded character width, line block drawing and box drawing2
n = ‘wnnn’ or ‘Wnnn’
Expanded character i 1.2 mm
Line block drawing and box drawing i 1 dot
This parameter shows the width of expanded characters as shown above.
Expanded character rotation2
n = ‘a0’ or ‘A0’‘Upright (preset)
n = ‘a1’ or ‘A1’‘Rotated 90 degrees
n = ‘a2’ or ‘A2’‘Upside down, rotated 180 degrees
n = ‘a3’ or ‘A3’‘Rotated 270 degrees
5
Quick reference for barcode control commands
2
Barcode data start2
n = ‘b’ or ‘B’
Data that follows ‘b’ or ‘B’ is read in as barcode data. barcode data must end with the ‘ \ ’ code (5CH), which
also ends this command. The acceptable barcode data is determined by the barcode mode selected by ‘t’ or
‘T’.
When CODE 39 is chosen with the parameter ‘t0’ or ‘T0’
Forty three characters ‘0’ to ‘9’, ‘A’ to ‘Z’, ‘-’, ‘ . ’, ‘ (space)’, ‘$’, ‘ / ’, ‘+’, and ‘%’ can be accepted as barcode
data. Other characters will cause a data error. The number of characters for barcodes is not limited. The
barcode data automatically starts and ends with an asterisk ‘ * ’ (start character and stop character). If the
received data has an asterisk ‘ * ’ at the beginning or end, the asterisk is regarded as a start character or
stop character.
When Interleaved 2 of 5 is selected with the parameter ‘t1’ or ‘T1’:
Ten numerical characters ‘0’ to ‘9’ can be accepted as barcode data. Other characters cause a data error.
The number of characters for barcodes is not limited. This mode of barcodes needs even characters. If
the barcode data has odd characters, ‘0’ is automatically added to the end of the barcode data.
When FIM (US-Post Net) is selected with the parameter ‘t3’ or ‘T3’
Characters ‘A’ to ‘D’ are valid and one digit of data can be printed. Upper-case and lower-case alphabet
characters can be accepted.
When Post Net (US-Post Net) is selected with the parameter ‘t4’ or ‘T4’
Numbers ‘0’ to ‘9' can be data and it must end with a check digit. ‘?’ can be used instead of the check digit.
When EAN 8, EAN 13, or UPC A is selected with the parameter ‘t5’ or ‘T5’
Ten numbers ‘0’ to ‘9’ can be accepted as barcode data. The number of characters for barcodes is limited
as follows:
A number of characters other than those stated above will cause a data error that results in the barcode
data being printed as normal print data. If the check digit is not correct, the machine decides the correct
check digit automatically so that the correct barcode data will be printed. When EAN13 is selected, adding
‘+’ and a two-digit or five-digit number after the data can create an add-on code.
When UPC-E is selected with the parameter ‘t6’ or ‘T6’:
The numbers ‘0’ to ‘9’ can be accepted as barcode data.
12
Eight digits
(standard format) The first character must be ‘0’ and the data must end with a check digit.
Total eight digits = ‘0’ plus 6 digits plus 1 check digit.
Six digits
2
The first character and the last check digit are removed from the eight digit data.
1
‘?’ can be used instead of a check digit.
2
Adding ‘+’ and two-digit or five-digit number after the data creates an add-on code.
6
Quick reference for barcode control commands
2
When Codebar is chosen with the parameter ‘t9’ or ‘T9’
Characters ‘0’ to ‘9’, ‘-’, ‘ . ’, ‘$’, ‘/’, ‘+’, ‘ : ’ can be printed. Characters ‘A’ to ‘D’ can be printed as a start-stop
code, which can be upper case or lower case. If there is no start-stop code, errors will happen. A check
digit cannot be added and using ‘?’ causes errors.
When Code 128 Set A, Set B, or Set C is selected with the parameter ‘t12’ or ‘T12’, ‘t13’ or ‘T13’, or ‘t14’
or ‘T14’
Code 128 sets A, B and C can be individually selected. Set A shows characters Hex 00 to 5F. Set B
includes characters Hex 20 to 7F. Set C includes the pairs 00 to 99. Switching is allowed between the code
sets by sending %A, %B, or %C. FNC 1, 2, 3, and 4 are produced with %1, %2, %3, and %4. The SHIFT
code, %S, allows temporary switching (for one character only) from set A to set B and vice versa. The ‘%’
character can be encoded by sending it twice.
When ISBN (EAN) is selected with the parameter ‘t130’ or ‘T130’
The same rules apply as for ‘t5’ or ‘T5’.
When ISBN (UPC-E) is selected with the parameter ‘t131’ or ‘T131’:
The same rules apply as for ‘t6’ or ‘T6’.
When EAN 128 set A, set B or set C is selected with the parameter ‘t132’ or ‘T132’, ‘t133’ or ‘T133’ or ‘t134’
or ‘T134’
The same rules apply as for ‘t12’ or ‘T12’, ‘t13’ or ‘T13’, or ‘t14’ or ‘T14’.
Box drawing2
ESC i ... E (or e)
‘E’ or ‘e’ is a terminator.
Line block drawing2
ESC i ... V (or v)
‘V’ or ‘v’ is a terminator.
Expanded character data start2
n = ‘l’ or ‘L’
Data that follows ‘l’ or ‘L’ is read as expanded character data (or labeling data). Expanded character data must
end with the ‘ \ ’ code (5CH), which also ends this command.
7
Quick reference for barcode control commands
2
X
X
T
A
T
@
A
T
X
Y
(
)
_
A
Table of Code(EAN) 128 set C2
Code(EAN) 128 set C describes an original command. The correspondence table is as follows.
No. Code 128 Set C Input commandHexNo. Code 128 Set C Input commandHex