zpl.tools
Bar codes

^BS - UPC/EAN Extension

The two- or five-digit add-on printed beside a UPC or EAN symbol, used for periodical issue numbers and suggested prices.

^BS prints the small add-on symbol to the right of a UPC or EAN bar code. Two digits give a periodical's issue number, and five give a suggested retail price, as on ISBN and magazine labels. It is a bar code in its own right and not a mode of ^BU or ^B9, so a format places and sizes it as a second field.

Syntax

^BSo,h,f,g

Support

Supportedparsed: full · state: full · rendered: full

Every documented parameter renders the same output Labelary produces.

Labelary renders this command.

Parameters

oBar code orientationoptional · one of a set

Rotation of the symbol and interpretation line.

Default
the orientation set by ^FW, which itself defaults to N
Invalid value
discarded, and the default applies. The renderer reports an unrecognized character as invalid, and uses the default.
Test coverage
No documented value is exercised by a test (N, R, I, B). The invalid-value rule is not pinned by a test.
N
No rotation (default)
R
Rotated 90° clockwise
I
Rotated 180°. The symbol reads upside down
B
Rotated 270° clockwise
hBar code heightoptional · dots

Height of the bars, without the interpretation line.

Default
the height set by ^BY, which itself defaults to 10 dots
Accepted range
1 to 32000 dots
Invalid value
clamped to the nearest allowed value. We measured this against live Labelary on 2026-07-12. The renderer clamps an out-of-range value to the violated bound, and does not ignore it.
Test coverage
Bounds pinned: below the minimum (0), above the maximum (32001). No test at the minimum or maximum. The invalid-value rule is not pinned by a test.
fPrint interpretation lineoptional · Y or N

Whether the renderer prints the interpretation line.

Default
Y
Invalid value
discarded, and the default applies. The renderer reports any character except Y or N, and uses the default.
Test coverage
No documented value is exercised by a test (Y, N). The invalid-value rule is not pinned by a test.
Y
Print the text (default)
N
Print the symbol only
gInterpretation line aboveoptional · Y or N

Where the interpretation line sits. It has no effect without that line.

Default
Y
Invalid value
discarded, and the default applies. The renderer reports any character except Y or N, and uses the default.
Test coverage
No documented value is exercised by a test (Y, N). The invalid-value rule is not pinned by a test.
Y
Above the symbol (default)
N
Below the symbol

Behavior

The field data is exactly two or five digits. The printer pads a shorter payload on the left with zeros and truncates a longer one. A four-digit price therefore becomes a five-digit one with a leading zero and not an error.

One default differs from the host symbol. The interpretation line prints above the add-on and not below, because the digits belong with the top of the composite. That is the guide's default and not a typo.

The format must position the extension itself, and the composite is compliant only at the correct offset. For a module width of 2 dots the guide gives the offsets from the host symbol's origin as:

HostX offsetY offset
UPC-A209 dots21 dots
UPC-E122 dots21 dots

For a rotated composite the X offset becomes 0, and the same number becomes the Y offset. The extension must also be 27 dots shorter than the host symbol. The guide's worked pairing is a 183-dot primary with a 155-dot extension.

The renderer does not parse ^BS. It reports the command as valid ZPL that it does not support, and the add-on is absent. The host symbol still renders, so the omission is easy to miss on a proof: the label looks finished and the price is gone.

Tested behavior

Example

A five-digit price extension beside a UPC-A symbol, at the guide's offsets and 27 dots shorter than its host:

^XA
^BY2
^FO50,50^BUN,150,Y,N,Y^FD07000021981^FS
^FO259,71^BSN,123,Y,Y^FD04414^FS
^XZ

Open in viewer