^BU UPC-A Barcode
Prints a UPC-A barcode, a fixed-length numeric code, from exactly 11 characters of field data.
^BUo,h,f,g,e
^BU parameters
| Parameter | Meaning | Accepted values | Default |
|---|---|---|---|
oorientationp. 142 |
Direction in which the barcode is rotated. |
|
The current |
hBarcode height (in dots)pp. 94, 142 |
Height of the bars in dots. The upper limit is 9999 here, where the other linear barcode entries in this set give 32000. |
|
The height set by |
fprint interpretation linep. 142 |
Whether the human-readable text of the data is printed with the barcode. |
|
Y
|
gprint interpretation line above codep. 142 |
Whether the interpretation line is printed above the barcode instead of below it. |
|
N
|
eprint check digitp. 142 |
Whether the check digit is printed. |
|
Y
|
^BU notes and gotchas
-
Gotcha
The field data must be exactly 11 characters: ZPL II cuts longer data down or pads shorter data with zeros on the left to reach that length. The guide does not say which end is cut when data is too long.
p. 142 -
Interaction
Field data is limited by
p. 190^FDto 3072 bytes and cannot contain the command prefix characters ^ and ~ directly. -
Note
The print ratio is fixed.
pp. 142, 1588 -
Note
The code uses the Mod 10 check-digit scheme for error checking.
pp. 143, 1591 -
Note
The font of the interpretation line depends on the module width set with
pp. 142, 143^BY, and zero is not allowed. The guide's thresholds for an OCR-B line are: 2 dots or more on a 6 dot/mm printer, 3 or more on 8 dot/mm, 5 or more on 12 dot/mm and 9 or more on 24 dot/mm. Below those widths the line is printed in font A (1 dot on 6 dot/mm; 1 to 2 on 8; 1 to 4 on 12; 1 to 8 on 24). -
Note
The guide says the 6, 12 and 24 dot/mm printheads produce UPC/EAN symbologies at 100 percent size, and an 8 dot/mm printhead produces them at a magnification factor of 77 percent.
p. 142 -
Note
The guide's example on page 143 is introduced as a UPC-A barcode with extension, and it adds the extension with a separate
pp. 143, 1588^BSfield at its own^FOposition. The^BUentry itself has no parameter or text about extensions; the barcode table lists^BSas the command for UPC/EAN extensions.
^BU example
^XA ^FO40,40^BUN,90,Y,N,Y^FD12345678901^FS ^XZ
A UPC-A barcode from 11 digits of data, not rotated and 90 dots high, with the interpretation line printed below it and the check digit parameter set to yes.
Guides that use ^BU
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 94, 109, 142, 143, 148, 190, 208, 1588, 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.