^B9
UPC-E Bar CodePreview: partialThe compressed six-digit UPC, for retail packages too small to carry a full UPC-A.
Syntax
^B9o,h,f,g,eParameters
| Parameter | Description and accepted values | If omitted |
|---|---|---|
| o | Rotation of the bar code on the label.N normal, R 90°, I 180°, B 270° | Last ^FW value, else N |
| h | Bar height in dots. Overrides the height set by ^BY for this field only.1 to 32000 dots | Height set by ^BY |
| f | Prints the digits underneath the bars as text.Y or N — print the human-readable line | Y |
| g | Moves that text above the bars instead.Y or N — put that line above the bars | N |
| e | Prints the check digit as part of that text.Y or N — print the check digit | Y |
How it works
^B9 prints UPC-E, a UPC-A with its zeroes squeezed out. A manufacturer whose code and product number contain the right pattern of zeroes can have the twelve digits compressed to six, which fits on a pack of gum where UPC-A would not.
The compression is not free-form: only certain UPC-A codes have a UPC-E equivalent, and the mapping is fixed by the GS1 specification. A scanner expands the six digits back to the full twelve before the point of sale sees them.
Send the code as seven or eight digits — the six data digits with the number system and check digit. The printer will not invent a valid UPC-E out of an arbitrary number.
Example
^XA
^BY2,3,80
^FO60,60^B9N,80,Y,N,Y^FD1234565^FS
^XZRendering…
How the preview on this site handles it
Drawn with a real UPC-E encoder, so it scans, and rotation is applied. One thing the preview does not reproduce: the guard bars that extend below the rest of the symbol on a retail UPC, and the digits that sit beside them. Every bar is drawn to the same height.
Common mistakes
- Passing a number that has no UPC-E form. Not every UPC-A compresses, and the field will not encode.
- Shrinking it below the GS1 minimum. UPC-E has a defined magnification range; printing it smaller is what makes a retail scanner refuse the pack.
- Losing the quiet zone. UPC needs clear space either side, and a field origin too close to the label edge is the usual cause of a no-read.