Guides › TSPL vs EPL: migrating off a legacy fleet

TSPL vs EPL: migrating off a legacy fleet

Published:

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.

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

What is ZPL?

ZPL is the language Zebra thermal printers understand. How to read the commands, how a label is put together, and the most common mistakes.

Which barcode symbology should I use?

EAN-13, Code 128 or QR? Practical rules for picking a barcode based on your data, your space and the scanner that has to read it.

How to preview a ZPL file without a printer

A ZPL file is just text — the label only exists once something draws it. Three practical ways to see a ZPL label before it reaches the printer.

Try your own ZPL code →