zpl.tools
Format control

^XZ - End Format

Ends a label format and prints it.

^XZ closes the format ^XA opened, and makes a label print. On a printer it is the commit point. Through this API it is the page boundary, so the number of ^XA^XZ pairs in a request is the number of returned pages, before ^PQ multiplies any of them.

Syntax

^XZ

Alternate form: 0x03.

Support

Supportedparsed: full · state: full · rendered: full

Every documented parameter renders the same output Labelary produces.

Labelary renders this command.

Parameters

^XZ takes no arguments.

Behavior

^XZ closes an open field. A format that ends ^FDopen^XZ, with no ^FS, renders byte for byte the same as one that terminates the field properly. This renderer and Labelary agree (measured 2026-07-30). That is still a bad habit, because a missing ^FS in the middle of a format swallows the commands that follow into the field data.

^XZ does not tidy up after the format. Fonts, bar code defaults and the prefix characters from ^CC, ^CT and ^CD all survive into the next ^XA — see

^XA for the measurements. Treat ^XZ as "print this now", not as "reset".

A format with nothing drawable in it, including the degenerate ^XA^XZ, renders no page rather than a blank one.

Tested behavior

Example

Two labels in one request. Each pair is a page, so this returns two.

^XA
^FO50,50^A0N,40,40^FDLabel one^FS
^XZ
^XA
^FO50,50^A0N,40,40^FDLabel two^FS
^XZ

Open in viewer