^BU generates a UPC-A barcode, the dominant retail point-of-sale barcode in North America. UPC-A encodes 12 digits: a number system digit, 5-digit manufacturer code, 5-digit product code, and a check digit (auto-calculated from the first 11 digits).
UPC-A is technically a subset of EAN-13 where the leading digit is always 0. Scanners capable of reading EAN-13 can read UPC-A, and vice versa (with the appropriate software configuration).
You provide exactly 11 digits in ^FD; the 12th check digit is calculated by the printer. Providing 12 digits is also accepted and the check digit is validated.
UPC-A has very precise size requirements for retail compliance. The nominal symbol is 1.469" × 1.02" (37.29 mm × 25.91 mm). Most retailers require the symbol to be between 80% and 200% of nominal size. Deviating outside this range can cause checkout scanner failures.
For products sold internationally, prefer EAN-13 (^BE) since it's the global standard. UPC-A is primarily used for US and Canadian markets.
Syntax
^BUo,h,f,g,e
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| o | N | R | I | B | N | Orientation: N = normal, R = 90°, I = 180°, B = 270°. |
| h | integer | BY default | Barcode height in dots. |
| f | Y | N | Y | Print interpretation line (human-readable digits below barcode). |
| g | Y | N | N | Print interpretation line above the barcode. |
| e | Y | N | Y | Check digit: Y = auto-calculate, N = no check digit (non-standard). |
Examples
UPC-A for a retail product
Try in Viewer^XA ^FO50,50^BY2,3,100^BUN,100,Y,N,Y^FD01234565^FS ^XZ
UPC-A with explicit 11 digits
Try in Viewer^XA ^FO50,50^BY2,3,100^BUN,100,Y,N,Y^FD03600024145^FS ^XZ
Common Mistakes
- !Providing 12 digits when the printer expects 11 — the 12th check digit is calculated automatically.
- !Using letters in the data — UPC-A is strictly numeric.
- !Sizing below 80% of nominal for retail use — checkout scanners may not reliably read undersized UPC symbols.