Sign In
Products
ZPL ViewerBarcode GeneratorImage → ZPLZPL cheat sheetLabel DesignerTemplate Gallery
Developers
API QuickstartAPI ReferenceMCP ServerBulk GenerationWebhooksSDKs & ExamplesLimitsDirectPrint agent NewGitHub ActionVS Code extensionOn-Premise
Solutions
Logistics & ShippingE-CommerceERP & WMSManufacturingRetailHealthcare & LaboratoryAll solutions
Tools
ZPL Diagnostics HubZPL DebuggerSize & DPI AnalyzerDPI ConverterBarcode fit calculatorShipping Label AnalyzerFont InspectorOrientation DebuggerCalibration AssistantPrinter Compatibility CheckerBarcode Readability CheckerPrinter Language DetectorThermal Printer Test PackZPL ToolsEPL ToolsTSPL ToolsCPCL ToolsPrinter Language ConverterAll ToolsGuidesPricing
Language
EnglishTürkçeDeutsch
Home›Guides›TSPL vs EPL: migrating off a legacy fleet

TSPL vs EPL: migrating off a legacy fleet

Published: · Updated:

Very few teams choose between TSPL and EPL. The real situation is a replacement: an ageing EPL fleet is being retired, the new hardware speaks TSPL, and the templates that have worked for a decade have to be rebuilt. This page is about that move, not about which language is "better".

What carries over

More than you expect. Both languages are line-oriented, both position in dots from the top-left, both terminate a job with an explicit print command, and both express barcodes as a command with positional arguments. If you can read one, the other is legible within an hour.

The shape of a job is also familiar: clear the buffer, describe the label, print it. N and CLS do the same work; so do P and PRINT.

What has no counterpart

TopicEPLTSPL
Label sizeq (width) and Q (height + gap), both in dots SIZE in real units and GAP in real units
Buffer clearNCLS
TextA50,50,0,4,1,1,N,"HELLO" TEXT 50, 50, "3", 0, 1, 1, "HELLO"
Barcode typeA code in a positional slot (1, 3, E30, UA0) A quoted string ("128", "39", "EAN13", "UPCA")
Rotation0–30, 90, 180, 270
PrintP1PRINT 1

The size command is the one that changes how you think. EPL's q/Q are dots, so the physical label size lives half in the file and half in the media you loaded. TSPL's SIZE takes millimetres or inches, so the job states its own physical size. During a migration that is an upgrade — but only if you re-derive the geometry from measurements instead of copying the old dot values, which were correct for one specific density.

Rotation is the other quiet trap: an EPL 2 means 180°, while a TSPL 2 is not a valid rotation at all. A mechanical find-and-replace produces jobs that look fine and rotate wrongly.

A migration order that works

  1. Measure the label, not the file. Get the physical width and height in millimetres. That is what SIZE wants, and it is the only value that survives a change of resolution.
  2. Rebuild one template by hand and render both versions side by side. Do not batch-convert until one has been proven.
  3. Test with the longest real data, not the sample record — a template that fits in EPL at one font can overflow in TSPL at the nearest equivalent.
  4. Check barcode module widths on the new hardware. Module width is in dots in both languages, so a change of print density changes the physical bar width and therefore scannability.
  5. Keep the old fleet running until the new templates pass a real shift, not just a test print.

Command equivalents: ZPL, TSPL and EPL

The same job in three dialects. Positions and sizes are not interchangeable — ZPL and EPL count dots, TSPL sizes the label in millimetres or inches — so use the table to find the command, then re-measure.

ConceptZPLTSPLEPL
Start / end a label^XA … ^XZCLSN
Label width^PWSIZEq
Label length^LLSIZEQ
Gap between labels^MNGAPQ
Black-mark media^MNMBLINE*— no native command
Origin offset^LHREFERENCER
Text field^FO + ^A + ^FDTEXTA
Linear barcode^BY + ^BCBARCODEB
QR code^BQQRCODE— no native command
Box^GBBOXX
Filled line^GBBARLO
Copies^PQPRINTP
Print orientation^PODIRECTION*ZT* / ZB*
Darkness^MDDENSITY*D*
Print speed^PRSPEED*S*
Character set^CICODEPAGE*I*

* Parsed but not drawn by the Labelixa preview for that language — the printer still applies it.

Checking both without printers

Render the old job and the new one and compare them on screen: the EPL viewer and the TSPL viewer use separate engines, each with a documented scope, and both report printer-behaviour commands instead of drawing them. Per-language debugging detail is in EPL preview and debugging and TSPL preview and debugging.

Related guides

Previewing and debugging EPL without a printer

Legacy EPL/EPL2 jobs, rendered in the browser: what each line does, which findings matter, and what a preview will not draw.

ZPL vs CPCL: desk printers and mobile units

Which to use: ZPL unless the printer is a CPCL mobile unit. Side-by-side command table, how to check and switch the printer language, and how to port a label.

EPL label content shifted

An EPL label that prints shifted sideways is usually a printer setting, not the form: q width, the R reference point, and stored forms that inherit both.

ZPL vs TSPL: what actually differs

Label size in dots versus real units, job structure, text and barcode syntax — the ZPL and TSPL differences that actually cost porting time.

Try your own ZPL code →