Barcode
Prints a one-dimensional barcode using one of the supported ESC/POS symbologies.
Content may use at most 256 bytes after CP437 encoding. The selected format determines its other character and length rules. CODE128 content must begin with the code-set prefix {A, {B, or {C.
Example
{
"type": "barcode",
"format": "CODE128",
"content": "{B1234567890",
"align": "center",
"hriPosition": "bottom"
}Fields
| Field | Type | Description |
|---|---|---|
typerequired | "barcode" | Discriminator for barcode blocks. |
formatrequired | string | Barcode symbology. The selected format determines the allowed character set and length.
|
contentrequired | string | Data to encode in the barcode. Must be at most 256 bytes after CP437 encoding; other character and length rules depend on the selected format.
|
alignoptional | string | Horizontal alignment of the printed barcode.
|
hriPositionoptional | string | Human-readable interpretation text position relative to the barcode.
|
hriFontoptional | string | Font used for the human-readable interpretation text.
|
widthoptional | 1 | 2 | 3 | 4 | 5 | 6 | Width of the narrowest barcode bar in printer dots. Larger values produce wider barcodes. |
heightoptional | integer | Height of the barcode in printer dots.
|