Introduction to ^XA and ^XZ — start and end of a ZPL label

ZPL course · ZPL FAQ

Command reference: Labelary ZPL introduction.

Below, commands are bold, parameters are colored, field data stays plain.

Introduction to ^XA and ^XZ — start and end of a ZPL label

Goal

Print your first label: open a format with ^XA and close it with ^XZ.

Description

Every ZPL label is one format: it must open with ^XA and close with ^XZ. Nothing outside this pair prints.

Example

^XA
^FX One label: a start bracket, fields, an end bracket.
^FO20,20^A0N,32,32^FDHello ZPL^FS
^XZ

Rendered ^XA and ^XZ label

Result

The smallest complete label: a single text field between the brackets. Line by line: ^XA opens the label; ^FX is a comment the printer ignores; ^FO 20,20 places the field; ^A 0N,32,32 picks the font and size; ^FD…^FS wraps the text Hello ZPL; ^XZ closes the label and prints it. The next lesson unpacks ^XA line by line, then ^XZ gets its own deep dive.

Article author: Andrei Olegovich

Related articles
RFID
ZPL
ZPL course: 54 lessons
ZPL FAQ
RFID tools
Banner image

Search this site

Channel @aofeed Chat @aofeedchat

Contacts and cooperation:
I recommend our hosting beget.ru
Write to info@urn.su, info@aredel.com if you:
1. Want to write an article for our site or translate an article into your native language.
2. Want to place thematically relevant ads on the site.
3. Ads on my site pass maximum censorship. If you see an ad block unsuitable for school-age children, shocking or misleading - please contact us by e-mail
4. Found a mistake, inaccuracy, bug, etc. on the site. ... .......
5. Articles can be shared on social media by clicking a network icon: