^B9 UPC-E Barcode

Barcodes ZPL caret command

Prints a UPC-E barcode, the zero-suppressed short form of UPC-A for number system 0, from ten characters of field data.

Format ^B9o,h,f,g,e

^B9 parameters

Parameters of ^B9
ParameterMeaningAccepted valuesDefault
oorientationp. 85

Direction in which the barcode is rotated.

  • Nnormal
  • Rrotated 90 degrees (clockwise)
  • Iinverted 180 degrees
  • Bread from the bottom up, 270 degrees

The current ^FW value.

hbar code height (in dots)p. 85

Height of the bars in dots.

1 to 32000 dots

The height set by ^BY.

fprint interpretation linep. 85

Whether the human-readable text of the data is printed with the barcode.

  • Yprint the interpretation line
  • Ndo not print it
Y
gprint interpretation line above codep. 85

Whether the interpretation line is printed above the barcode instead of below it.

  • Yabove the code
  • Nnot above the code
N
eprint check digitp. 86

Whether the check digit is printed.

  • Yprint the check digit
  • Ndo not print it
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 ^BS entry says UPC and EAN extensions are designed to be used with UPC-A (^BU) and UPC-E (^B9).

    p. 137
  • Interaction

    Field data is limited by ^FD to 3072 bytes and cannot contain the command prefix characters ^ and ~ directly.

    p. 190
  • 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 ^BY must be used to set the width of the narrow bar.

    pp. 85, 1587
  • 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 ^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.

    pp. 85, 86

^B9 example

example.zplZPL
^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.