ZPLToolkit

^FW

Field OrientationPreview: partial

Turns every following field a quarter, half or three-quarter turn, so a template can be rotated without touching each command.

Syntax

^FWa,b

Parameters

ParameterDescription and accepted valuesIf omitted
aRotation applied to fields that do not state their own.N normal, R 90°, I 180°, B 270°N
bDefault justification, on firmware V60.14.x and later.0 left, 1 right, 2 autoLast justification

How it works

^FW sets the orientation that ^A and every bar code command use when their own `o` parameter is left out. It is how a label meant for a portrait roll is printed on a landscape one, and how a side-mounted address block is written without repeating the rotation on every line.

A field that names its own orientation wins: with ^FWR in force, ^A0N still prints normally. That makes ^FW a default rather than an override, and it is why a template can turn everything and then exempt one field.

Commands that have no orientation parameter are untouched. ^GB and ^GF stay exactly where and how they are, so a rotated template still needs its boxes and graphics repositioned by hand.

Rotation is clockwise, and it never moves a field to the other side of its origin: ^FO keeps holding the upper-left corner of the field, measured after the turn.

Example

ZPL
^XA
^FWR
^FO60,40^A0,35,35^FDTurned^FS
^FO220,40^A0N,35,35^FDNormal^FS
^XZ

Rendering…

^FWR turns the first field; the second states N and prints normally despite it.
Open in the viewer

How the preview on this site handles it

The orientation is applied, and so is the rule that a field's own parameter takes precedence. The justification parameter b is not, and neither is the printer's habit of keeping ^FW in force between labels — the preview starts every format at N.

Common mistakes

  • Expecting ^FW to rotate the whole label. It rotates fields about their own origins; the coordinates stay where they are, so a rotated design usually needs new ^FO values too.
  • Expecting ^GB to follow. Boxes and graphics have no orientation parameter and stay upright.
  • Assuming a field with an explicit orientation still inherits from ^FW. ^A0N under ^FWR prints normally, which is easy to read as ^FW being ignored.

See also