^FO
Field OriginPreview: partialPlaces the top-left corner of the next field. It is the command you will use more than any other.
Syntax
^FOx,y,zParameters
| Parameter | Description and accepted values | If omitted |
|---|---|---|
| x | Distance from the left edge of the label, in dots.0 to 32000 dots from the left edge | 0 |
| y | Distance from the top edge of the label, in dots.0 to 32000 dots from the top edge | 0 |
| z | Justification for the field. Requires firmware V60.14.x or later.0 left, 1 right, 2 auto | Last ^FW value, otherwise 0 |
How it works
^FO sets where the next field starts, in dots, measured from the label origin. The coordinate is the top-left corner of the field: text hangs down and to the right of it, and so does a barcode or a graphic box.
Coordinates are always in dots, so the same ^FO50,50 lands in a different physical spot on a 203 dpi and a 300 dpi printer. When you migrate a template between resolutions, every coordinate scales by the ratio between them.
^FO stays in effect until the field is closed with ^FS. The companion command ^FT positions by the text baseline instead of the top-left corner, which is usually what you want when you are aligning text of different sizes.
Example
^XA
^FO50,50^A0N,40,40^FDLeft^FS
^FO50,120^A0N,40,40^FDBelow^FS
^XZRendering…
How the preview on this site handles it
Position is reproduced exactly. The justification parameter z is parsed but not applied, so right-justified and auto-justified fields preview as left-justified.
Common mistakes
- Treating the coordinates as millimetres. They are dots — divide by 8 for millimetres at 203 dpi.
- Placing a field at a coordinate outside ^PW or ^LL. It is clipped rather than reported, so the field simply vanishes.
- Using ^FO to align text of different sizes. The tops line up but the baselines do not; use ^FT for that.