^BZ - Postal Bar Code
USPS postal symbologies — POSTNET, PLANET and Intelligent Mail — selected by a type argument.
^BZ prints one of the USPS postal symbologies, chosen by its type argument:
POSTNET, PLANET, or the Intelligent Mail barcode. The USPS accepts only
Intelligent Mail for new mailings, so a current address block needs type 3. The
other two reproduce existing artwork.
Syntax
^BZo,h,f,g,tSupport
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
- No documented value is exercised by a test (N, R, I, B). The invalid-value rule is pinned by 1 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 (99999). 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
- N
- Invalid value
- discarded, and the default applies. The renderer reports any character except
YorN, 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
N- Print the symbol only (default)
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. Not exercised: N. The invalid-value rule is not pinned by a test.
Y- Above the symbol
N- Below the symbol (default)
tPostal bar code typeoptional · one of a setWhich postal symbology to encode. Intelligent Mail is the only symbology that the USPS still accepts for new mailings.
- Default
- 0
- Invalid value
- not documented, and we have not measured it. No measurement covers a type that the renderer does not recognize. The reserved type 2 is a different case: it is a documented value, and the renderer draws nothing and reports an invalid argument.
- Test coverage
- Bounds pinned: above the maximum (4). Values exercised: 0, 1, 2, 3.
0- POSTNET (default)
1- PLANET
2- Reserved. The renderer draws nothing for the field and reports an invalid argument. Labelary also draws nothing. Labelary reports no warning.
3- USPS Intelligent Mail (four-state)
Behavior
All three types are height-modulated and not width-modulated. POSTNET and PLANET
use five bars of two heights for each digit, and Intelligent Mail uses four
states for each bar. The ^BY ratio therefore has no meaning here, and the
height argument applies.
The field data is digits, and the length of the number distinguishes one code from another within each type. A POSTNET ZIP, ZIP+4 and delivery-point code are the same symbology at three lengths. The guide gives no length rule of its own, so the payload must be valid for the selected type. Nothing converts between them.
As with ^B5, the interpretation line is off by default. A person is not the
intended reader of a postal code, and on a mailpiece the printed digits sit in
the address block and not under the bars.
The renderer does not parse ^BZ. It reports the command as valid ZPL that it
does not support, and it draws nothing. ^B5 renders a PLANET symbol, which
covers the type 1 case only. Nothing substitutes for POSTNET or Intelligent Mail.
Known issues
Tested behavior
Differences from the specification
Labelary against the ZPL II guide
Where Labelary — our compatibility target — behaves differently from the printed specification.
- The 2006 guide documents
^BZas POSTNET only, with four arguments and no way to select a symbology. Later firmware adds the fifth type argument, PLANET and Intelligent Mail. Labelary documents that firmware. The renderer follows Labelary. — not pinned by a test
Example
An Intelligent Mail barcode, the only type still accepted for new mailings:
^XA
^FO50,50^BY3
^BZN,80,N,N,3
^FD00040123456200800001^FS
^XZ
Related commands
^B5Planet Code Bar CodeUSPS PLANET postal symbology, retired by the USPS and superseded by Intelligent Mail.^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.