Guides › ZPL label content shifted

ZPL label content shifted

Published:

Health report

The layout is intact — nothing clipped, nothing resized — but everything sits lower or further right than designed, or one text line floats above where it should anchor. Shifts have four file-side suspects, they stack, and each has a different fix.

^LH — the label home

^LH30,20 moves the origin of every field: a field at ^FO50,50 actually lands at 80,70. It exists so one template can be nudged for stock with a pre-printed margin — and it bites when a template written for that stock travels to plain labels. If the whole layout is offset by one constant amount in both axes, look for ^LH first.

^LS — the horizontal shift

^LS slides the whole label left or right, and it accepts negative values. Its classic use is centring a narrow layout on wider media; its classic failure is a leftover value pushing content toward one edge — horizontal-only offset, vertical untouched.

^LT — the top offset, applied by the printer

^LT moves the whole label up or down relative to where the printer believes the label starts. An honest tool note: our preview recognises ^LT but does not simulate it — the structural check lists it as a command the renderer does not apply, so the on-screen position deliberately ignores it. Vertical-only offset with clean ^LH and ^LS → check ^LT, then the printer's own top-position setting.

^FO vs ^FT — the one-field shift

When a single field sits wrong while the rest align, the position command is the suspect. ^FO anchors the top-left corner of the field; ^FT anchors the text baseline — the same coordinates produce text roughly one character height apart. A template mixing the two looks aligned in the author's head and staggered on paper. Pick one convention per template.

When it is genuinely the printer

If the file carries no ^LH/^LS/^LT and uses one position convention, a drift that varies label-to-label — or grows down the roll — is physical: the media sensor finding the gap late, or media loaded loosely. That is calibration and mechanics; a constant, repeatable shift is almost always one of the four commands above.

Frequently asked questions

Why does my whole ZPL layout print shifted by a constant amount?

A constant shift in both axes points at ^LH, which moves the origin of every field; a horizontal-only shift at ^LS; a vertical-only one at ^LT or the printer's top-position setting. A drift that varies label-to-label is physical — sensor or loosely loaded media.

Why does one field sit wrong while the others align?

Check its position command: ^FO anchors the field's top-left corner, ^FT anchors the text baseline — the same coordinates differ by roughly one character height. Templates mixing the two print staggered; use one convention per template.

Does the preview apply ^LT?

No — the preview recognises ^LT but does not simulate it, and the structural check lists it as a command the renderer does not apply. The on-screen position deliberately ignores it; the printer applies it at print time.

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 →