^B2
Interleaved 2 of 5 Bar CodePreview: partialA very dense numeric symbology — and the one most likely to be misread if you use it without a check digit.
Syntax
^B2o,h,f,g,eParameters
| 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 | Bar height in dots.1 to 32000 dots | Height set by ^BY |
| f | Prints the digits underneath the bars as text.Y or N — print the human-readable line | Y |
| g | Moves those digits above the bars instead.Y or N — put that line above the bars | N |
| e | Adds a mod-10 check digit. Turn it on unless a specification says otherwise.Y or N — add a mod-10 check digit | N |
How it works
^B2 prints Interleaved 2 of 5, which encodes digits in pairs: one digit in the bars, the next in the spaces between them. That interleaving is what makes it the densest of the classic numeric symbologies, and it is why the data must have an even number of digits. An odd count means the printer either pads it with a leading zero or refuses the field.
It is still the symbology behind ITF-14, the code on shipping cartons, and it survives in warehouse and pharmaceutical labelling for exactly one reason: it fits more digits into less space than anything else that old scanners read.
Its weakness is that the symbology cannot tell where it ends. A scanner that reads only part of the symbol — because of a torn label or a badly angled scan — can return a shorter number that still looks valid. The defences are the optional mod-10 check digit and bearer bars around the symbol; ITF-14 requires both, and any other use should copy that.
Example
^XA
^BY2,3,80
^FO60,50^B2N,80,Y,N^FD1234567890^FS
^XZRendering…
How the preview on this site handles it
Drawn with a real Interleaved 2 of 5 encoder, rotation included. The wide-to-narrow ratio from ^BY is not applied — the preview uses the encoder's own — and the bearer bars a real ITF-14 needs are not drawn.
Common mistakes
- An odd number of digits. Decide deliberately where the padding zero goes instead of letting the printer choose.
- Skipping the check digit. Short reads are this symbology's known failure mode, and the check digit is what catches them.
- Leaving out the bearer bars on a carton label. Without them a partial scan is much more likely.