Skip to main content

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​

TagEffect
<b>...</b>Bold
<u>...</u>Underlined
<sm>...</sm>Small font
<md>...</md>Medium font
<lg>...</lg>Large font

Alignment​

TagEffect
<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.

TagPermitted charactersSize
<upc_a>...</upc_a>0-911 or 12 chars
<ean13>...</ean13>0-912 or 13 chars
<ean8>...</ean8>0-97 or 8 chars
<code39>...</code39>0-9, A-Z, space, %, +, -, ., /, $1–255 chars
<itf>...</itf>0-92–254 chars, even number
<codabar>...</codabar>0-9, A-D, $, +, -, ., /, :1–255 chars
<code93>...</code93>valid Base64 string1–255 decoded bytes
<code128>...</code128>valid Base64 string2–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.