ZPLToolkit

^FR

Field Reverse PrintPreview: exact

Inverts the next field against its background: black becomes white, so text can be knocked out of a filled box.

Syntax

^FR

This command takes no parameters.

How it works

^FR makes the next field print in the inverse of whatever is already under it. Over a black box the text comes out white; over blank label stock it disappears, because white on white prints nothing.

It is how you produce the reversed header bars that shipping labels use for the carrier name or a service level. The usual recipe is a solid ^GB box, then ^FR on the text field placed on top of it.

^FR affects only the field it precedes and is cleared by ^FS. It can be placed anywhere between the field's ^FO and its ^FD.

Example

ZPL
^XA
^FO40,40^GB520,120,120^FS
^FO70,80^FR^A0N,40,40^FDReversed^FS
^XZ

Rendering…

A solid ^GB box, then reversed text knocked out of it.
Open in the viewer

How the preview on this site handles it

Fully supported. The preview composites the field with a difference operation, which has the same per-pixel result as the printer's reversal.

Common mistakes

  • Using ^FR on blank stock. There is nothing to reverse against, so the field prints white on white and vanishes.
  • Drawing the box after the text. Order matters — the box has to be there first.
  • Expecting ^FR to persist. It applies to one field only.

See also