^BJ - Standard 2 of 5 Bar Code
Numeric symbology with wide spaces between characters, the least dense of the 2 of 5 family.
^BJ prints a Standard 2 of 5 symbol. It carries all of its data in the bars, as
^BI Industrial 2 of 5 does, and uses a wider gap between characters. That gap
makes it the widest encoding of a run of digits in ZPL.
Standard 2 of 5 exists for compatibility with existing equipment. ^B2
Interleaved 2 of 5 encodes the same digits in far less space.
Syntax
^BJo,h,f,gSupport
Every documented parameter renders the same output Labelary produces.
Labelary renders this command.
Parameters
oBar code orientationoptional · one of a setRotation of the symbol and interpretation line.
- Default
- the orientation set by
^FW, which itself defaults toN - Invalid value
- discarded, and the default applies. The renderer reports an unrecognized character as invalid, and uses the default.
- Test coverage
- Values exercised: 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 · dotsHeight 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 (33000). No test at the minimum or maximum. The invalid-value rule is not pinned by a test.
fPrint interpretation lineoptional · Y or NWhether the renderer prints the interpretation line.
- Default
- Y
- Invalid value
- discarded, and the default applies. The renderer reports any character except
YorN, and uses the default. - Test coverage
- Values exercised: 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 NWhere the interpretation line sits. It has no effect without that line.
- Default
- N
- Invalid value
- discarded, and the default applies. The renderer reports any character except
YorN, and uses the default. - Test coverage
- Values exercised: Y, N. The invalid-value rule is not pinned by a test.
Y- Above the symbol
N- Below the symbol (default)
Behavior
The character set is the digits 0 to 9. The code is discrete and
self-checking, so it needs no check digit and sets no length limit. An odd count
is valid here, unlike in ^B2.
Standard 2 of 5 has two element widths, and the wide bar is three times the
narrow bar. The ^BY ratio applies over the guide's range of 2.0:1 to 3.0:1.
The interpretation line shows exactly the digits supplied. The width of the label
limits the field data, or its length for a rotated symbol.
Known issues
Tested behavior
Differences from the specification
zpl.tools against the ZPL II guide
Where our renderer behaves differently from the specification.
- The guide takes the default orientation from
^FW. The renderer applies^FWto text fields only. A barcode after^FWRprints unrotated unless its ownoargument rotates it. — not pinned by a test
Example
The same six digits as the Industrial 2 of 5 example, at the same 3-dot module width:
^XA
^FO50,50^BY3
^BJN,80,Y,N
^FD123456^FS
^XZ
Related commands
^BYBar Code Field DefaultSets the module width, wide-to-narrow ratio and height that every later bar code inherits.^FDField DataSupplies the text or barcode content of the field.^FOField OriginSets the top-left corner of the next field.^FTField TypesetPositions the next field by its text baseline rather than its top edge.^B2Interleaved 2 of 5 Bar CodeDense numeric symbology that encodes digits in pairs. The payload must have an even length.^BIIndustrial 2 of 5 Bar CodeNumeric symbology that encodes data in the bars only. The spaces are separators only.