^XZ
End FormatPreview: partialCloses a label format and tells the printer to image and feed the label. Without it, nothing prints.
Syntax
^XZThis command takes no parameters.
How it works
^XZ ends the format opened by ^XA. It is the command that actually causes the label to be imaged and fed — until the printer receives it, everything you sent is only sitting in its buffer.
^XZ takes no parameters. Any field left open by a missing ^FS is closed when the format ends, but the field itself may print incorrectly, so relying on that is not a substitute for closing your fields properly.
A common integration bug is a stream that ends without a trailing ^XZ, often because a template was concatenated wrongly or a newline was trimmed. The symptom is always the same: the printer accepts the data, the status light stays normal, and no label appears.
Example
^XA
^FO40,60^A0N,45,45^FDPrinted on ^FS
^FO40,130^A0N,45,45^FDone label^FS
^XZRendering…
How the preview on this site handles it
The preview draws the label as soon as it finishes reading, so a missing ^XZ still shows something here even though a real printer would print nothing. The validator flags it as format/missing-xz.
Common mistakes
- Forgetting ^XZ. The printer waits indefinitely for the rest of the format and prints nothing.
- Sending ^XZ without a matching ^XA. The printer has no open format to close and discards the command.
- Putting a ^XZ in the middle of a label to 'flush' it. That ends the label there and everything after it becomes a new format.