ZPLToolkit

^LH

Label HomePreview: exact

Moves the label origin. Every later ^FO and ^FT is measured from this point rather than from the top-left corner.

Syntax

^LHx,y

Parameters

ParameterDescription and accepted valuesIf omitted
xHorizontal shift of the origin, in dots.0 to 32000 dots0
yVertical shift of the origin, in dots.0 to 32000 dots0

How it works

^LH shifts the origin of the label. After ^LH60,40 a field placed at ^FO0,0 prints 60 dots right and 40 dots down from the corner, and every other coordinate on the label moves with it.

That makes it the right tool for correcting alignment: if a whole label prints a few millimetres off, a single ^LH nudges everything at once instead of editing every ^FO. It is also how one template can be reused on stock with a different leading margin.

^LH applies to the rest of the format and resets to 0,0 at the next ^XA unless it is saved as a power-up default. Negative values are not allowed — to move content up or left, reduce the field coordinates instead.

Example

ZPL
^XA
^LH60,40
^FO0,0^GB460,180,3^FS
^FO30,60^A0N,40,40^FDShifted^FS
^XZ

Rendering…

The box is placed at ^FO0,0, but ^LH60,40 moves the whole label 60 dots right and 40 down.
Open in the viewer

How the preview on this site handles it

Fully supported: the preview measures every ^FO and ^FT from the ^LH origin, exactly as the printer does.

Common mistakes

  • Using ^LH to fix one misplaced field. It moves everything — change that field's ^FO instead.
  • Expecting negative values to work. The printer rejects them; ^LH only moves the origin away from the corner.
  • Setting ^LH after the first field. Fields already placed keep their old coordinates.

See also