^BB - Codablock Bar Code
Stacked Code 128 variant that holds more data than one linear row, superseded by PDF417.
^BB prints a CODABLOCK symbol: up to 44 stacked rows, each a short linear bar
code with its own start and stop pattern. CODABLOCK carried large amounts of data
before the true 2D symbologies. ^B7 PDF417 and ^BX Data Matrix hold more data
in less space, so there is no reason to choose CODABLOCK for new work.
Syntax
^BBo,h,s,c,r,mSupport
Recognised as valid ZPL and not implemented, with no plan to.
Labelary does not implement ^BB either. There is no compatibility target to match, and there is no plan to add one. Use ^B7 PDF417 or ^BX Data Matrix. Both hold more data in less space. — pinned by test_unparsed_barcode_commands_do_not_print_their_data_as_text
Labelary does not implement it either, so there is no parity reference.
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 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
hRow heightoptional · dotsHeight of one row of the symbol.
- Default
- 8
- Accepted range
- 2 to 32000 dots
- Invalid value
- not documented, and we have not measured it. Labelary does not implement
^BB, so no measurement target exists. - Test coverage
- No test at the minimum, maximum or one step outside the range.
sCalculate check digitsoptional · Y or NWhether the renderer computes check digits. Only Codablock A can turn this off.
- Default
- Y
- Invalid value
- discarded, and the default applies. The renderer does not implement this command, and computes nothing.
- Test coverage
- No documented value is exercised by a test (Y, N). The invalid-value rule is not pinned by a test.
Y- Compute check digits (default)
N- No check digits (Codablock A only)
cColumns per rowoptional · integerCharacters per row. This number controls the symbol width.
- Default
- sized to fit the data
- Accepted range
- 2 to 62 characters
- Invalid value
- not documented, and we have not measured it. The renderer does not implement or measure this command.
- Test coverage
- No test at the minimum, maximum or one step outside the range.
rRowsoptional · integerNumber of rows. Codablock A accepts 1-22. Codablock E and F accept 2-4.
- Default
- sized to fit the data
- Accepted range
- 1 to 22
- Invalid value
- not documented, and we have not measured it. The renderer does not implement or measure this command.
- Test coverage
- No test at the minimum, maximum or one step outside the range.
mCodablock variantoptional · one of a setWhich Codablock variant to encode.
- Default
- F
- Invalid value
- discarded, and the default applies. The renderer does not implement this command. The argument has no effect.
- Test coverage
- No documented value is exercised by a test (A, E, F). The invalid-value rule is not pinned by a test.
A- Codablock A
E- Codablock E
F- Codablock F (default)
Behavior
The variant argument decides which character set the field data must use, so
settle that argument first. CODABLOCK A uses the Code 39 character set, and a
character outside that set prints no symbol, or an error when ^CV is active.
CODABLOCK F uses the full Code 128 set except the characters that ZPL reserves.
CODABLOCK E is the same set with an automatic FNC1, and that FNC1 makes an E
symbol a GS1 symbol. ^FH inserts function codes and the Code 128 subset A null
character as 80 to 84 hex, and a value above 84 hex prints no symbol.
The printer computes check sums by default. Only CODABLOCK A can turn them off, and a single-row symbol never carries them.
Rows and columns interact, and most of the failure modes are silent. Know these rules before a run:
- neither given — a single row;
- columns given but too large, and no row count — one row as long as the field data;
- rows given but no columns — the characters per row are the field data divided by the row count;
- both given — the field data must be shorter than their product. A longer field
data prints no symbol, or an error when
^CVis active.
The row count is a request and not a promise, even with both arguments given. Mostly numeric data can need fewer rows than the argument asks, and data with many shift characters and code-switch characters can need more.
The height argument is the height of one row, multiplied by the module width. The
^BY module width applies to CODABLOCK A only, and the ^BY ratio has no effect
on E or F.
Use ^B7 PDF417 or ^BX Data Matrix instead. Both render today.
Tested behavior
Differences from the specification
Labelary against the ZPL II guide
Where Labelary — our compatibility target — behaves differently from the printed specification.
- The guide gives
^BBa fixed orientation default ofNrather than the usual^FWvalue. Labelary documents the^FWdefault. Neither engine implements the command, so no measurement exists. — not pinned by a test
zpl.tools against Labelary
Where our output differs from Labelary for the same input. These are the differences that break a migration.
- Labelary does not draw a symbol either, but prints the field data on the label as an ordinary text run with no warning (measured 2026-07-30). The renderer draws nothing and reports a diagnostic, so a label that looks plausible on Labelary comes back empty. — not pinned by a test
Example
A CODABLOCK F symbol, two rows of sixteen characters:
^XA
^FO50,50^BY3
^BBN,10,Y,16,2,F
^FDCODABLOCK DATA^FS
^XZ
Related commands
^B7PDF417 Bar CodeStacked two-dimensional symbology that holds several hundred bytes, used on driving licenses and shipping documents.^BXData Matrix Bar CodeCompact two-dimensional symbology used for small-part marking and GS1 DataMatrix.^BCCode 128 Bar CodeThe most common symbology for shipping and GS1 application identifiers, with four data-encoding modes.^B4Code 49 Bar CodeStacked alphanumeric symbology from the 1980s, superseded by PDF417 and Data Matrix.