ZPLToolkit

^B8

EAN-8 Bar CodePreview: partial

The short EAN, for products too small to carry a full EAN-13: seven digits plus a check digit.

Syntax

^B8o,h,f,g

Parameters

ParameterDescription and accepted valuesIf omitted
oRotation of the bar code on the label.N normal, R 90°, I 180°, B 270°Last ^FW value, else N
hBar height in dots.1 to 32000 dotsHeight set by ^BY
fPrints the digits underneath the bars as text.Y or N — print the human-readable lineY
gMoves those digits above the bars instead.Y or N — put that line above the barsN

How it works

^B8 prints EAN-8, the compressed retail symbology used on packs where an EAN-13 physically does not fit — single sachets, small cosmetics, confectionery.

It encodes 7 digits plus a check digit the printer calculates, in a fixed 67 modules. That is about 30% narrower than an EAN-13, which is the whole point of it.

EAN-8 numbers are not shortened EAN-13s: they are issued separately by the numbering authority, precisely because there is no way to derive one from the other. Truncating a 13-digit code to eight digits produces a bar code that scans and identifies the wrong product, or nothing at all.

Example

ZPL
^XA
^BY3
^FO60,50^B8N,80,Y,N^FD96385074^FS
^XZ

Rendering…

An eight-digit EAN-8, check digit included.
Open in the viewer

How the preview on this site handles it

Drawn with a real EAN-8 encoder, rotation included; anything other than 7 or 8 digits is drawn as a hatched red box. As with EAN-13, the guard bars are not extended below the symbol.

Common mistakes

  • Deriving an EAN-8 from an EAN-13 by cutting digits. They are separate allocations — the result identifies something else.
  • Using EAN-8 to save space on a shipping label. It is a retail symbology; a shipping label wants Code 128 or GS1-128.
  • Forgetting that the eighth digit is the check digit, and sending eight digits of data.

See also