^BB
CODABLOCK Bar CodePreview: partialCode 128 stacked into a block of rows, for when a linear code would be too long to fit the label.
Syntax
^BBo,h,s,c,r,mParameters
| Parameter | Description and accepted values | If omitted |
|---|---|---|
| o | Rotation of the bar code on the label.N normal, R 90°, I 180°, B 270° | Last ^FW value, else N |
| h | Height of an individual row in dots, not of the whole block.2 to 32000 dots — height of one row | 8 |
| s | Security level — how much error correction the symbol carries.0 to 3 — security level | 2 |
| c | Number of data columns. Leave it out and the printer chooses.2 to 62 — data columns | Chosen by the printer |
| r | Number of rows. Leave it out and the printer chooses.2 to 44 — rows | Chosen by the printer |
| m | CODABLOCK mode. F is the one nearly every specification means.A, E or F — CODABLOCK mode | F |
How it works
^BB prints CODABLOCK, which takes the data a Code 128 would carry and stacks it into rows. Mode F — the default and the only one in common use — builds each row as a Code 128, so a scanner that reads linear codes can read a CODABLOCK a row at a time and reassemble it.
It exists for the case where the data is too long for one row but a true 2D code is not an option, usually because the installed scanners are linear. Blood bank labels and some pharmaceutical specifications still call for it.
As with Code 49, the height parameter is the height of one row. The column and row counts can be fixed, but leaving them to the printer produces the tightest block the data allows.
Example
^XA
^BY2,3,80
^FO60,60^BBN,20,3,,,F^FDZPL TOOLKIT^FS
^XZRendering…
How the preview on this site handles it
Drawn with a real CODABLOCK F encoder, so it scans, and rotation is applied. The security level, column and row counts are left to the encoder: setting `s`, `c` or `r` does not change the preview, though it does change what the printer produces.
Common mistakes
- Reading `h` as the height of the whole block. It is one row, and the block is that height times the row count.
- Requesting modes A or E. They exist in the command but almost nothing reads them; F is what specifications mean by CODABLOCK.
- Using it where a 2D code would do. If the scanners are imagers, ^BX carries the same data in far less space.