^LH Label Home

Sets the label home position — the origin from which all field coordinates are measured.

Supported in ZPL Preview

^LH defines the home position (origin) of the label. All ^FO field coordinates are measured relative to this point. By default, the label home is 0,0 — the top-left corner of the printable area.

Changing ^LH offsets every field on the label simultaneously, without changing any individual ^FO command. This is useful for batch-adjusting a label design to compensate for media alignment issues, or for centering a design on a label that has unprintable margins.

For example, if your label design uses coordinates starting at 0,0 but your printer has a 10-dot left margin, set `^LH10,0` to shift the entire layout right by 10 dots without touching any ^FO values.

^LH is a per-format setting — it applies only to the format it's defined in. You typically place it near the top of the format, after ^XA, before any field definitions.

On most Zebra printers, the maximum x value is limited to the print width minus 1, and y is limited to the label length minus 1. Setting ^LH values outside these bounds moves the origin off the label and all fields will be clipped.

Syntax

^LHx,y

Parameters

ParameterTypeDefaultDescription
xinteger0Horizontal offset in dots from the physical left edge of the printable area.
yinteger0Vertical offset in dots from the physical top edge of the printable area.

Examples

Shift all fields right and down by 20 dots

Try in Viewer
^XA
^LH20,20
^FO50,50^A0N,36,36^FDOffset Label^FS
^FO50,100^A0N,28,28^FDAll fields shifted^FS
^XZ

Default home (explicit 0,0)

Try in Viewer
^XA
^LH0,0
^FO30,30^A0N,40,40^FDTop-left origin^FS
^FO30,85^A0N,28,28^FDNormal coordinates^FS
^XZ

Common Mistakes

  • !Confusing ^LH with ^FO — ^LH shifts the origin for the whole label; ^FO positions a single field relative to that origin.
  • !Setting ^LH after field definitions — it should appear before any ^FO commands or the offset won't apply to earlier fields.
  • !Using ^LH to compensate for a misconfigured media offset — better to fix the printer's media calibration instead.
^LH Label Home — ZPL Command Reference | Prynta Co | Prynta Co