ZPL II Programming Guide - Zebra Technologies

ZPL II Programming

Guide

For Firmware Version x.14 and Later

13979L-010

? 2008 ZIH Corp. The copyrights in this manual and the software and/or firmware in the label printer

described therein are owned by ZIH Corp. Unauthorized reproduction of this manual or the software and/or

firmware in the label printer may result in imprisonment of up to one year and fines of up to $10,000

(17 U.S.C.506). Copyright violators may be subject to civil liability.

This product may contain ZPL?, ZPL II?, and ZebraLink? programs; Element Energy Equalizer? Circuit;

E3?; and Monotype Imaging fonts. Software ? ZIH Corp. All rights reserved worldwide.

ZebraLink and all product names and numbers are trademarks, and Zebra, the Zebra logo, ZPL, ZPL II, Element

Energy Equalizer Circuit, and E3 Circuit are registered trademarks of ZIH Corp. All rights reserved worldwide.

All other brand names, product names, or trademarks belong to their respective holders. For additional

trademark information, please see Trademarks on the product CD.

Proprietary Statement This manual contains proprietary information of Zebra Technologies Corporation

and its subsidiaries (Zebra Technologies). It is intended solely for the information and use of parties operating

and maintaining the equipment described herein. Such proprietary information may not be used, reproduced, or

disclosed to any other parties for any other purpose without the express, written permission of Zebra

Technologies.

Product Improvements Continuous improvement of products is a policy of Zebra Technologies. All

specifications and designs are subject to change without notice.

Liability Disclaimer Zebra Technologies takes steps to ensure that its published Engineering specifications

and manuals are correct; however, errors do occur. Zebra Technologies reserves the right to correct any such

errors and disclaims liability resulting therefrom.

Limitation of Liability In no event shall Zebra Technologies or anyone else involved in the creation,

production, or delivery of the accompanying product (including hardware and software) be liable for any

damages whatsoever (including, without limitation, consequential damages including loss of business profits,

business interruption, or loss of business information) arising out of the use of, the results of use of, or inability

to use such product, even if Zebra Technologies has been advised of the possibility of such damages. Some

jurisdictions do not allow the exclusion or limitation of incidental or consequential damages, so the above

limitation or exclusion may not apply to you.

Part Number: 13979L-010 Rev. A

Contents

Functional List of ZPL Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

Alphabetical List of ZBI Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

Alphabetical List of Set/Get/Do Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

About This Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

Who Should Use This Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

How This Document Is Organized . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Contacts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Web Site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

The Americas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Europe, Africa, Middle East, and India . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Asia Pacific . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Document Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

32

32

33

33

33

33

33

34

1 ? Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

2 ? ZPL Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

Basic ZPL Exercises and Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Before you begin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

^A Scalable/Bitmapped Font . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

^A@ Use Font Name to Call Font . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

^B0 Aztec Bar Code Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

^B1 Code 11 Bar Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

^B2 Interleaved 2 of 5 Bar Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

^B3 Code 39 Bar Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

^B4 Code 49 Bar Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

^B5 Planet Code bar code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

^B7 PDF417 Bar Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

^B8 EAN-8 Bar Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

6/19/08

ZPL II Programming Guide

41

41

51

53

55

57

59

61

65

69

70

74

13979L-010 Rev. A

4

Contents

^B9 UPC-E Bar Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76

^BA Code 93 Bar Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78

^BB CODABLOCK Bar Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82

^BC Code 128 Bar Code (Subsets A, B, and C) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86

^BD UPS MaxiCode Bar Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100

^BE EAN-13 Bar Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103

^BF MicroPDF417 Bar Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105

^BJ Standard 2 of 5 Bar Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108

^BI Industrial 2 of 5 Bar Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .110

^BK ANSI Codabar Bar Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .112

^BL LOGMARS Bar Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .114

^BM MSI Bar Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .116

^BO Aztec Bar Code Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .118

^BP Plessey Bar Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120

^BQ QR Code Bar Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122

^BR RSS (Reduced Space Symbology) Bar Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130

^BS UPC/EAN Extensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132

^BT TLC39 Bar Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135

^BU UPC-A Bar Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137

^BX Data Matrix Bar Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139

^BY Bar Code Field Default . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143

^BZ POSTAL Bar Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145

^CC ~CC Change Caret . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147

^CD ~CD Change Delimiter

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148

^CF Change Alphanumeric Default Font

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149

^CI Change International Font/Encoding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150

^CM Change Memory Letter Designation

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154

^CO Cache On . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155

^CT ~CT Change Tilde . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157

^CV Code Validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158

^CW Font Identifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160

~DB Download Bitmap Font . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162

~DE Download Encoding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164

^DF Download Format

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166

~DG Download Graphics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167

~DN Abort Download Graphic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170

~DS Download Intellifont (Scalable Font) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171

~DT Download Bounded TrueType Font

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172

~DU Download Unbounded TrueType Font . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173

~DY Download Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174

~EG Erase Download Graphics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178

^FB Field Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179

^FC Field Clock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182

^FD Field Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183

^FH Field Hexadecimal Indicator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184

13979L-010 Rev. A

ZPL II Programming Guide

6/19/08

Contents

^FL Font Linking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

^FM Multiple Field Origin Locations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

^FN Field Number . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

^FO Field Origin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

^FP Field Parameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

^FR Field Reverse Print

...............................................

^FS Field Separator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

^FT Field Typeset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

^FV Field Variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

^FW Field Orientation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

^FX Comment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

^GB Graphic Box

....................................................

^GC Graphic Circle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

^GD Graphic Diagonal Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

^GE Graphic Ellipse

..................................................

^GF Graphic Field . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

^GS Graphic Symbol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

~HB Battery Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

~HD Head Diagnostic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

^HF Host Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

^HG Host Graphic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

^HH Configuration Label Return . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

~HI Host Identification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

~HM Host RAM Status

................................................

~HQ Host Query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

~HQ Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

~HS Host Status Return . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

^HT Host Linked Fonts List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

~HU Return ZebraNet Alert Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

^HV Host Verification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

^HW Host Directory List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

^HY Upload Graphics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

^HZ Display Description Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

^ID Object Delete . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

^IL Image Load . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

^IM Image Move . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

^IS Image Save . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

~JA Cancel All . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

^JB Initialize Flash Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

~JB Reset Optional Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

~JC Set Media Sensor Calibration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

~JD Enable Communications Diagnostics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

~JE Disable Diagnostics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

~JF Set Battery Condition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

~JG Graphing Sensor Calibration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

6/19/08

ZPL II Programming Guide

186

189

192

193

194

195

196

197

199

200

202

203

205

206

207

208

210

212

213

214

215

216

217

218

219

221

226

229

230

231

232

234

235

237

239

241

242

244

245

246

247

248

249

250

251

13979L-010 Rev. A

5

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download