^B2 Interleaved 2 of 5 Bar Code
Prints an Interleaved 2 of 5 barcode, a numeric-only linear code, from the data of the next field.
^B2o,h,f,g,e,j
^B2 parameters
| Parameter | Meaning | Accepted values | Default |
|---|---|---|---|
oorientationp. 68 |
Direction in which the barcode is rotated. |
|
The current |
hbar code height (in dots)p. 68 |
Height of the bars in dots. |
|
The height set by |
fprint interpretation linep. 68 |
Whether the human-readable text of the data is printed with the barcode. |
|
Y
|
gprint interpretation line above codep. 68 |
Whether the interpretation line is printed above the barcode instead of below it. |
|
N
|
ecalculate and print Mod 10 check digitpp. 68, 69 |
Whether the printer calculates a Mod 10 check digit and prints it as part of the code. |
|
N
|
^B2 notes and gotchas
-
Gotcha
The total number of digits must be even. If an odd number of digits is received, the printer puts a leading 0 in front. The guide does not say whether this is checked before or after a Mod 10 check digit is added.
p. 69 -
Interaction
Field data is limited by
p. 190^FDto 3072 bytes and cannot contain the command prefix characters ^ and ~ directly. -
Note
The code accepts print ratios from 2.0:1 to 3.0:1, so the ratio set with
pp. 68, 148, 1587^BYapplies to it. -
Note
The field data is limited to the width of the label (or its length, if the barcode is rotated).
p. 68 -
Note
The code uses the Mod 10 check-digit scheme for error checking. The guide's Mod 10 section describes the calculation in five steps.
pp. 69, 1591 -
Note
On the EAN-13 page the guide says that Interleaved 2 of 5 is the code to use for UCC and EAN 14.
p. 109 -
Guide issue
The Format line is printed as
p. 68^B2o,h,f,g,e,j, but the parameter table describes only o, h, f, g and e. The guide gives no meaning, accepted values or default for j.
^B2 example
^XA ^FO40,40^B2N,80,Y,N,N^FD12345678^FS ^XZ
An Interleaved 2 of 5 barcode of eight digits (an even count), not rotated, 80 dots high, with the interpretation line printed below it and no added check digit.
Guides that use ^B2
BarcoderX is a .NET SDK for thermal labels and barcodes. See the barcode types it covers.
Source Zebra, ZPL II, ZBI 2, Set-Get-Do, Mirror, WML Programming Guide, P1134473-11EN Rev A, 2026/07/05, pages 68 to 70, 109, 148, 190, 208, 1587, 1591.
Written by BarcoderX in its own words. Checked against the guide on 2026-11-14.
ZPL and ZPL II are trademarks of Zebra Technologies Corporation. This reference is written by BarcoderX in its own words from Zebra's published programming guide. BarcoderX is an independent product and is not affiliated with, endorsed by or sponsored by Zebra Technologies.