Draws a barcode: type, narrow bar width, ratio, height and position come from parameters; the data ends the line.
Engine status: Partially rendered
The command is drawn but some of its parameters are ignored; the detail is in the note below.
BARCODE <type> <narrow> <ratio> <h> <x> <y> <data>! 0 200 200 210 1
PAGE-WIDTH 576
BARCODE 128 1 1 100 50 150 123456
PRINTOpen this example in the preview →
Output of the example above in our renderer (203 dpi). Not verified on a physical printer.
| Parameter | Meaning |
|---|---|
type | Symbology; the preview draws 128, 39, EAN13 and UPCA |
narrow | Narrow bar width in dots; sets the module width |
ratio | Wide-to-narrow ratio; accepted but not used by the Labelixa preview |
h | Bar height in dots |
x y | Top-left corner of the barcode in dots — AFTER the size fields |
data | The rest of the line; the preview draws no human-readable line under it |
Putting x y first as in TSPL: CPCL expects type, narrow, ratio and height before the position; BARCODE 50 150 128 1 1 100 123456 names type 50 and is skipped.
ZPL equivalent: ^BC · ^BY · Language comparison
! · PAGE-WIDTH · TEXT · TEXT90 · TEXT180 · TEXT270 · LINE · BOX · EXPANDED-GRAPHICS · PRINT · FORM · CONTRAST · TONE · SPEED · JOURNAL · SETMAG · CENTER