The ^FO command establishes the origin (starting point) for a field. It defines where the upper-left corner of the field will be placed on the label, measured in dots from the current label home position (^LH).
Every label field — text, barcode, or graphic — needs a field origin. ^FO must appear before the field-content commands (such as ^FD, ^BC, ^BQ, or ^GB). You can think of it as setting the cursor position before you type.
Coordinates are measured in printer dots. At 203 DPI, one inch equals 203 dots; at 300 DPI, one inch equals 300 dots. So ^FO50,100 at 203 DPI places the field approximately 0.25" from the left and 0.49" from the top.
The third optional parameter controls horizontal justification: 0 is left-justified (default), 1 is right-justified, and 2 is auto-justified.
Syntax
^FOx,y[,z]
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| x | integer | 0 | Horizontal position in dots from the label home origin (left edge). |
| y | integer | 0 | Vertical position in dots from the label home origin (top edge). |
| z | 0 | 1 | 2 | 0 | Justification: 0 = left, 1 = right, 2 = auto. |
Examples
Simple text at position 50, 100
Try in Viewer^XA ^FO50,100^A0N,36,36^FDHello, World!^FS ^XZ
Multiple fields at different origins
Try in Viewer^XA ^FO50,30^A0N,55,55^FDShipping Label^FS ^FO50,100^A0N,28,28^FDOrder #12345^FS ^FO50,140^BY2,3,90^BCN,90,Y,N,N^FD123456789012^FS ^XZ
Common Mistakes
- !Forgetting to pair ^FO with a field-terminator (^FS) — this leaves the field open and can corrupt subsequent fields.
- !Using pixel values instead of dot values — coordinates must be in printer dots, not pixels or millimeters.
- !Placing ^FO after the field-content command — ^FO must always come before ^FD, ^BC, ^BQ, etc.