^BK
ANSI Codabar Bar CodePreview: partialAn older numeric symbology kept alive by libraries, blood banks and courier systems, with letters A–D marking where the data starts and stops.
Syntax
^BKo,e,h,f,g,k,sParameters
| 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 |
| e | Present for compatibility; Zebra does not use it.N — the parameter exists but is not used | N |
| h | Bar height in dots.1 to 32000 dots | Height set by ^BY |
| f | Prints the data underneath the bars as text.Y or N — print the human-readable line | Y |
| g | Moves that text above the bars instead.Y or N — put that line above the bars | N |
| k | Start character. Systems that use the pair as a type marker rely on this.A, B, C or D — the start character | A |
| s | Stop character.A, B, C or D — the stop character | A |
How it works
^BK prints Codabar, which encodes digits and the symbols - $ : / . +, and wraps them in a start and a stop character chosen from A, B, C and D.
Those letters are part of the symbol, not decoration: some systems use the pair to signal what kind of number follows, which is why a library card and a blood-bank bag can share a symbology and still be told apart. The `k` and `s` parameters choose them, and the scanner usually reports them along with the data.
Nothing new is specified in Codabar today, but the installed base is large and the readers are everywhere, so it stays in the ZPL command set. For a new label design, Code 128 does the same job in less space and with a check digit.
Example
^XA
^BY2
^FO60,50^BKN,N,80,Y,N^FDA12345678A^FS
^XZRendering…
How the preview on this site handles it
Drawn with a real Codabar encoder, which expects the start and stop characters to be part of the ^FD data — as in the example. Rotation is applied; the wide-to-narrow ratio from ^BY is not, and neither are the `k` and `s` parameters: put the letters in the data to see them in the preview.
Common mistakes
- Sending data without start and stop characters and expecting the `k` and `s` parameters to add them everywhere. Different systems disagree on whether they are data or delimiters — check what the receiving system expects.
- Mixing start and stop letters between systems. A scanner configured to strip A/A will pass a D/D pair straight through into your data.
- Choosing Codabar for a new integration. It has no check digit and no letters; Code 128 is the modern answer.