What is TSPL?
TSPL (TSC Printer Language), also called TSPL2, is the command language of TSC thermal printers. Many budget desktop label printers, including some sold under other brands, use it. A 4×6 thermal printer that isn’t a Zebra often uses TSPL.
Example
Section titled “Example”SIZE 4,6GAP 0.12,0CLSTEXT 50,50,"3",0,1,1,"LabelZoom"BARCODE 50,120,"128",100,1,0,2,2,"12345678"PRINT 1TSPL puts one English-word command on each line. SIZE sets the label size, GAP sets the gap between labels, CLS clears the image buffer, TEXT and BARCODE draw fields, and PRINT prints the label. Field coordinates are in dots.
TSPL vs ZPL
Section titled “TSPL vs ZPL”| Aspect | TSPL | ZPL |
|---|---|---|
| Printers | TSC, and many budget desktop printers | Zebra, and other printers that emulate ZPL |
| Structure | One English-word command per line | A stream of ^-prefixed commands |
| Label size | SIZE, in inches or millimeters |
^PW and ^LL, in dots |
| Field coordinates | Dots | Dots |
Convert TSPL files
Section titled “Convert TSPL files”These free tools run in your browser:
- TSPL viewer: see a label without a printer.
- TSPL to PDF: get a printable PDF.
- TSPL to ZPL: convert the label for a Zebra printer.
- PDF to TSPL: create TSPL from a PDF.
The LabelZoom API converts TSPL to and from ZPL, PDF, and images. For example, POST /api/v2/convert/tspl/to/png renders TSPL as an image. If your shipping platform produces ZPL and your printer uses TSPL, convert the label with POST /api/v2/convert/zpl/to/tspl, or convert it to PDF and print it through the printer’s driver. Save TSPL output as bytes, not text; see Binary output.