^XA
Start FormatPreview: partialOpens a label format. Every ZPL label begins with ^XA, and the printer ignores field commands that arrive before it.
Syntax
^XAThis command takes no parameters.
How it works
^XA tells the printer that a new label format is starting. It takes no parameters and must be the first command of the label. Everything between ^XA and its matching ^XZ describes one label.
The printer buffers commands as they arrive and only images the label when it sees ^XZ. An ^XA that is never closed leaves the printer waiting for more data, which is the usual reason a label never comes out and the printer looks frozen.
You can send several labels in one stream by repeating the ^XA … ^XZ pair. Each pair is a separate label and each one starts from the printer's saved defaults, not from the state the previous label left behind.
Example
^XA
^FO40,60^A0N,45,45^FDOne label^FS
^XZRendering…
How the preview on this site handles it
The preview treats ^XA as the start of the drawing. It does not yet paginate: if you paste several ^XA … ^XZ blocks, they are all drawn onto the same canvas on top of each other.
Common mistakes
- Sending field commands before ^XA. The printer discards them silently, so the label prints with pieces missing and no error.
- Opening a second ^XA before closing the first with ^XZ. The printer treats it as a syntax error and the result is unpredictable.
- Assuming settings survive between labels. ^CF, ^BY and ^FW do reset to their power-up defaults at each ^XA unless they were saved with ^JUS.