ZPLToolkit

^BS

UPC/EAN ExtensionsPreview: partial

The two- or five-digit add-on that rides beside a UPC or EAN, carrying an issue number or a suggested price.

Syntax

^BSo,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. Overrides the height set by ^BY for this field only.1 to 32000 dotsHeight set by ^BY
fPrints the digits as text.Y or N — print the human-readable lineY
gPuts that text above the bars, which is where the specification wants it.Y or N — put that line above the barsY

How it works

^BS prints the UPC/EAN extension — the short block of bars that appears to the right of the main code on a magazine or a paperback. Two digits carry a periodical's issue number; five carry a suggested retail price.

It is not a bar code in its own right. An extension means nothing without the UPC or EAN it accompanies, and the pair has to be positioned to the spacing GS1 defines or a point-of-sale scanner will read the main code and ignore the add-on.

The digit count is what selects between the two forms: send two digits and you get the two-digit add-on, five and you get the five-digit one. There is no parameter for it.

Example

ZPL
^XA
^BY2,3,80
^FO60,60^BSN,80,Y,Y^FD12345^FS
^XZ

Rendering…

A five-digit price add-on, digits above the bars as the specification requires.
Open in the viewer

How the preview on this site handles it

Drawn with a real add-on encoder — two digits or five, chosen from the data as the printer does — so it scans, and rotation is applied. The preview draws the add-on alone: placing it the correct distance from its UPC or EAN is a matter of the two fields' origins, and the preview will show whatever spacing you give them.

Common mistakes

  • Sending three or four digits. Only two and five are valid add-on lengths.
  • Placing it by eye. GS1 defines the gap between the main symbol and its add-on; guessing it is what makes a scanner miss the extension.
  • Printing it without a main code. An add-on on its own is not a scannable product code.

See also