zpl.tools
Field Commands

^FO - Field Origin

Sets the position (origin) of a field

^FO - Field Origin

Overview

The ^FO command sets the starting position (X,Y coordinates) where the next field will be printed on the label.

Syntax

^FOx,y,z

Parameters

  • x = X-axis position in dots (horizontal)
  • y = Y-axis position in dots (vertical)
  • z = Justification (optional)
    • 0 = Left justify (default)
    • 1 = Right justify
    • 2 = Auto

Description

  • Specifies where the next field will begin
  • Coordinates are measured from label home (0,0)
  • Must precede field data commands
  • Works with fonts, barcodes, graphics, and text fields

Usage Notes

  • Coordinates are in dots
  • Label origin is typically top-left corner
  • Use ^LH to set the label home position
  • X increases left to right, Y increases top to bottom

Example

^XA ^FO50,50 ^ADN ^FDHello World^FS ^FO50,100 ^ADN ^FDSecond Line^FS ^XZ

Common Coordinate Reference

For a 4x6 label at 203 DPI:

  • Width: 0-815 dots
  • Height: 0-1223 dots
PositionDotsInches
000"
50500.25"
2032031"
4064062"
  • ^LH - Label Home
  • ^FT - Field Typeset
  • ^FD - Field Data

See Also