^B9 UPC-E Barcode
Prints a UPC-E barcode, the zero-suppressed short form of UPC-A for number system 0, from ten characters of field data.
^B9o,h,f,g,e
^B9 parameters
| Parameter | Meaning | Accepted values | Default |
|---|---|---|---|
oorientationp. 85 |
Direction in which the barcode is rotated. |
|
The current |
hbar code height (in dots)p. 85 |
Height of the bars in dots. |
|
The height set by |
fprint interpretation linep. 85 |
Whether the human-readable text of the data is printed with the barcode. |
|
Y
|
gprint interpretation line above codep. 85 |
Whether the interpretation line is printed above the barcode instead of below it. |
|
N
|
eprint check digitp. 86 |
Whether the check digit is printed. |
|
Y
|
^B9 notes and gotchas
-
Gotcha
The field data must be exactly 10 characters: a five-digit manufacturer code and a five-digit product code. Even when the shortened zero-suppressed symbol is wanted, all 10 characters are sent and ZPL II works out and prints the short form.
p. 85 -
Interaction
The
p. 137^BSentry says UPC and EAN extensions are designed to be used with UPC-A (^BU) and UPC-E (^B9). -
Interaction
Field data is limited by
p. 190^FDto 3072 bytes and cannot contain the command prefix characters ^ and ~ directly. -
Note
The code is a variation of UPC for number system 0: a shortened UPC-A in which zeros are suppressed, so it needs less printing space. Each character is made of four elements, two bars and two spaces.
p. 85 -
Note
The print ratio is fixed. The guide says
pp. 85, 1587^BYmust be used to set the width of the narrow bar. -
Note
Rules for valid product codes: if the manufacturer number ends in 000, 100 or 200, the product code runs 00000 to 00999. If it ends in 300, 400, 500, 600, 700, 800 or 900, the range is 00000 to 00099. If it ends in 10, 20, 30, 40, 50, 60, 70, 80 or 90, the range is 00000 to 00009. If it does not end in zero, the range is 00005 to 00009.
p. 86 -
Note
6, 12 and 24 dots/mm printheads produce the UPC and EAN symbologies at 100 percent of their size; an 8 dots/mm printhead produces them at a magnification factor of 77 percent.
p. 85 -
Guide issue
The Format line is printed as
pp. 85, 86^B9,h,f,g,e, with a comma straight after the command and no letter o, yet the parameter table starts with o (orientation) and lists five parameters. The record writes^B9o,h,f,g,e. The guide does not comment on this.
^B9 example
^XA ^FO40,40^B9N,80,Y,N,Y^FD1234500007^FS ^XZ
A UPC-E barcode from ten digits: the manufacturer code 12345 and the product code 00007 (the manufacturer number does not end in zero, so the guide's valid product range is 00005 to 00009). Not rotated, 80 dots high, interpretation line below the code, check digit printed.
Guides that use ^B9
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 85, 86, 137, 148, 190, 201, 1587, 1589.
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.