TSPL Command Reference
All 28 TSC Printer Language commands — grouped by category with syntax, parameters, and examples.
Control
CLSSupportedClears the image buffer before drawing a new label. Think of it as pressing "New Document" — it erases any previous content so you start fresh. Every label should begin with CLS after SIZE and GAP.
PRINTSupportedTriggers printing of the label. The first parameter sets the number of label sets; the optional second sets the number of copies per set. This is always the last command in a TSPL label — like pressing "Print".
FEEDSupportedFeeds the label stock forward by the specified number of dots. Useful for advancing past a label without printing, or for calibration.
BACKFEEDUnsupportedFeeds the label stock backward by the specified number of dots. Used to retract the label after printing so the tear-off or cutter position is correct.
FORMFEEDUnsupportedAdvances the media to the next label position. The printer uses the gap/bline sensor to detect the next label boundary and stops there.
HOMEUnsupportedFeeds the label until the internal sensor detects the gap or black mark, establishing a known starting position. This is a calibration command.
SELFTESTUnsupportedPrints a self-test page showing the printer configuration, firmware version, and diagnostic information.
INITIALPRINTERUnsupportedResets the printer to factory default settings. All custom settings, downloaded fonts, and stored images are cleared.
EOPUnsupportedMarks the end of a stored program. When downloading label templates to the printer's memory, EOP signals where the program ends.
Label Setup
SIZESupportedSets the width and height of the label. You can specify the dimensions in mm (millimetres) or inch. This must be the first configuration command — it tells the printer how big the label is.
GAPSupportedSets the gap distance between labels and the offset from the gap to the start of the printable area. The gap is the transparent space between die-cut labels on a roll.
BLINEUnsupportedSets the black line (black mark) height and offset for continuous media with black marks on the back. Used instead of GAP when labels have black registration marks.
REFERENCESupportedSets the reference origin point for all coordinates on the label. All subsequent X,Y positions are relative to this point. It is like setting page margins — shifting the entire design.
DIRECTIONSupportedSets the print direction. 0 = head moves forward (default), 1 = head moves backward. The optional second parameter mirrors the output.
OFFSETUnsupportedSets a horizontal offset for fine-tuning the print position. This shifts the entire label image left or right on the media.
Text
Graphics
BOXSupportedDraws a rectangle (box) from the top-left corner (x1,y1) to the bottom-right corner (x2,y2) with the specified line thickness. An optional radius parameter rounds the corners.
BARSupportedDraws a filled rectangular bar (solid black) at the specified position with the given width and height. Use this for solid divider lines, section fills, or thick separators.
REVERSESupportedInverts the specified rectangular area on the label — black becomes white and white becomes black. Use it over text to create white-on-black reversed text blocks.
ERASEUnsupportedErases (clears to white) the specified rectangular area in the image buffer. Anything previously drawn in that area is removed.
Barcodes & 2D Codes
BARCODESupportedDraws 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.
QRCODESupportedDraws a QR code at the specified position. You control the error correction level, cell size, encoding mode, and rotation. QR codes can store URLs, text, and other data.
DMATRIXUnsupportedDraws a Data Matrix 2D barcode at the specified position. Data Matrix is commonly used for small parts marking and pharmaceutical labelling due to its compact size.
Configuration
DENSITYSupportedSets the print darkness (density). Higher values produce darker output. The range is 0-15. Start at 8 and adjust up or down based on scan results and visual quality.
SPEEDSupportedSets the print speed in inches per second. Higher speeds are faster but may reduce print quality. Available speeds depend on your printer model.
CODEPAGEUnsupportedSets the character code page for text encoding. Different code pages support different character sets — important for international characters and special symbols.
SETUnsupportedSets various printer configuration parameters. This is a generic command that covers many settings like cutter mode, tear-off position, and other hardware options.
DOWNLOADUnsupportedBegins downloading a file (program, font, or image) to the printer's internal flash memory. The data follows on subsequent lines until EOP.
Try these commands live
The TSPL Playground lets you write TSPL and see labels render in real time — with syntax highlighting, autocomplete, and the full command reference built in.