BARCODE - 1D Barcode
Plain English
Draws a 1D barcode at the specified position. The "type" string selects the symbology — 30 values are valid per TSPL2 PG §BARCODE, covering Code 128, Code 39, EAN/UPC families, CODABAR, ITF, MSI, Plessey, and US/Chinese postal codes. The engine validates the type at parse time and emits a "did you mean" diagnostic on unknown values.
When to use
When you need any 1D barcode — shipping labels, product IDs, inventory tracking. Pick the symbology with the "type" parameter; for 2D codes use QRCODE, DMATRIX, PDF417, AZTEC, etc.
Syntax
BARCODE x,y,"type",height,readable,rotation,narrow,wide,"data"
Parameters
| Parameter | Description |
|---|---|
x | Horizontal position in dots |
y | Vertical position in dots |
type | Barcode symbology. One of 30 values per TSPL2 PG §BARCODE p33–37.
|
height | Barcode height in dots |
readable | Human-readable text rendering mode
|
rotation | Rotation in degrees
|
narrow | Narrow bar width in dots |
wide | Wide bar width in dots |
data | The data to encode (in double quotes) |
Example
BARCODE 50,200,"128",80,1,0,2,4,"ABC-12345"
Code 128 barcode with human-readable text below