BARCODE — 1D Barcode
Plain English
Draws a 1D barcode at the specified position. TSPL supports many barcode types including Code 128, Code 39, EAN-13, UPC-A, and more. The "type" string selects the symbology.
When to use
When you need any 1D barcode — shipping labels, product IDs, inventory tracking.
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 type: "128", "39", "EAN13", "UPCA", "93", "CODABAR", etc. |
height | Barcode height in dots |
readable | 0 = no human-readable text, 1 = text below, 2 = text above, 3 = both |
rotation | 0, 90, 180, or 270 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