ZPLToolkit

^FX

CommentPreview: exact

Adds a non-printing comment. Convenient for labelling sections of a template, with one sharp edge around carets.

Syntax

^FXc

Parameters

ParameterDescription and accepted valuesIf omitted
cThe comment text. Must not contain ^ or ~, which would end it early.Any text without ^ or ~None

How it works

^FX marks text that the printer ignores. It is the standard way to divide a long template into readable sections — the address block, the barcode, the footer — without affecting output.

The comment ends at the next ^ or ~, which is usually the following command on the next line and works exactly as you would expect. It also means a caret inside the comment text ends it early, and the rest of your sentence is then executed as ZPL commands.

A ^FS after ^FX is optional. Zebra's own examples include one, and either form is accepted.

Example

ZPL
^XA
^FX --- Recipient ---
^FO40,40^A0N,35,35^FDJohn Doe^FS
^FX --- Tracking number ---
^BY3
^FO40,110^BCN,70,Y,N,N^FD12345678^FS
^XZ

Rendering…

Two comments dividing a label into sections; neither one prints.
Open in the viewer

How the preview on this site handles it

Fully supported: comments produce no output. Note that a caret inside the comment ends it on the printer too, so the preview will show whatever follows being executed.

Common mistakes

  • Writing a caret inside the comment, as in '^FX use ^FO here'. Everything after the caret runs as a command.
  • Using ^FX for data you expect to retrieve later. It is discarded, not stored.
  • Very long comments in high-volume printing. They cost transmission time on slow serial links.

See also