^SZ - Set ZPL Version
Chooses between ZPL and ZPL II command semantics.
^SZ picks the dialect the printer applies to the rest of the input: the
original ZPL, or ZPL II. It lets one printer accept formats written for both,
and the guide discourages version 1. Neither this service nor Labelary
interprets version 1, so ^SZ1 returns ZPL II without a complaint rather than
the older semantics.
Syntax
^SZvSupport
Accepted and skipped, because it configures the printer rather than the label. It cannot change the rendered output, and Labelary skips it too.
The renderer and Labelary always interpret ZPL II, and Labelary's command table says "version 2 only". Both engines render a version 1 format as version 2: no compatibility gap, only a shared limitation. The renderer does not parse this command. It reports IGNORED_COMMAND at info severity, which does not reach X-Warnings. Labelary is also silent, so the rendered label is identical in both engines. — not pinned by a test
Labelary renders this command.
Parameters
vVersionoptional · one of a setnot honoured by zpl.toolsWhich dialect to interpret the rest of the format as. Version 1 changes how several commands behave and Zebra discourages it.
- Default
- 2
- Invalid value
- enough to make the whole command be ignored. The guide ignores the whole command when the argument is missing or invalid, so the previous version stays in force, not 2. This has no effect here: the renderer does not parse the command and reads everything as ZPL II.
- Test coverage
- No documented value is exercised by a test (1, 2). The invalid-value rule is not pinned by a test.
1- Original ZPL semantics, which the guide discourages — not honoured by zpl.tools
2- ZPL II (default)
Behavior
The guide keeps the setting active until another ^SZ or a power cycle, so it
is a mode rather than a per-label instruction. An invalid argument makes the
guide ignore the whole command, so the previous version stays in force rather
than 2.
^SZ2 therefore changes nothing and only documents an assumption, and ^SZ1 is
a request that neither engine can honor. Labelary's command table records the
same limitation as "version 2 only", so this is a shared gap rather than a
compatibility difference. A format that depends on version 1 semantics needs a
rewrite rather than a flag.
The renderer does not parse this command. It reports IGNORED_COMMAND at info
severity, which does not reach X-Warnings. Labelary is also silent, so the
rendered label is identical in both engines.
Example
Stating the version the rest of the format is written in:
^XA
^SZ2
^FO50,50^A0N,40,40^FDZPL II^FS
^XZ
Related commands
^XAStart FormatBegins a label format.^CC / ~CCChange CaretChanges the character that introduces a format command.^CT / ~CTChange TildeChanges the character that introduces a control command.