Ticket formatting
Jobs can optionally be formatted to enhance readability and accuracy. Format the body of a Job with the markup tags below.
Newlines
Use \n to start a new line.
Emphasis
| Tag | Effect |
|---|---|
<b>...</b> | Bold |
<u>...</u> | Underlined |
<sm>...</sm> | Small font |
<md>...</md> | Medium font |
<lg>...</lg> | Large font |
Alignment
| Tag | Effect |
|---|---|
<center>...</center> | Centered |
<right>...</right> | Right-aligned |
Jobs are printed left-aligned by default. Use these tags to temporarily change alignment.
Nesting of tags is not supported.
Changing alignment causes the thermal printer to feed to the next line, so left- and right-aligned text cannot appear on the same line.
Printers only accept ASCII characters. A
?is substituted for any non-ASCII character present in the Job body.
Barcodes
The following barcode types are supported: UPC-A, EAN13 and EAN8, Code 39, ITF, Codabar, Code 93, and Code 128.
| Tag | Permitted characters | Size |
|---|---|---|
<upc_a>...</upc_a> | 0-9 | 11 or 12 chars |
<ean13>...</ean13> | 0-9 | 12 or 13 chars |
<ean8>...</ean8> | 0-9 | 7 or 8 chars |
<code39>...</code39> | 0-9, A-Z, space, %, +, -, ., /, $ | 1–255 chars |
<itf>...</itf> | 0-9 | 2–254 chars, even number |
<codabar>...</codabar> | 0-9, A-D, $, +, -, ., /, : | 1–255 chars |
<code93>...</code93> | valid Base64 string | 1–255 decoded bytes |
<code128>...</code128> | valid Base64 string | 2–255 decoded bytes |
Example
<upc_a>01234567890</upc_a>
Code 93 and Code 128 payloads must be supplied as Base64, since they can encode binary data.