Preskoči na sadržaj

ZPL compatibility of the OpenZPL engine

The OpenZPL engine draws the 64 ZPL commands of the command reference, one of them partially, and skips the ones that configure the printer. The barcode and text commands listed under “Not supported yet” don't draw correctly today.

Tested 2026-10-26 with openzpl-api 10d0497 at 8 dpmm.

How we test

Every example on this site is a fixture: a short synthetic label that the engine renders to a PNG when the site is built. If a fixture's ZPL changes and its image isn't rendered again, the build fails, so the image always shows what the engine does with that exact code.

The 140 fixtures are public in fixtures.json, with their size, density and image, under CC0. Use them to test any ZPL renderer.

A preview isn't a print. Darkness, media, firmware and the fonts installed on a printer change the result, so check critical labels on the printer itself.

Drawn

CommandŠto to radiCategoryEvidence
^XA Otvara oznaku. Sve do ^XZ je jedna oznaka. Format oznake Rendered example
^XZ Zatvara oznaku otvorenu s ^XA i ispisuje je. Format oznake Rendered example
^PW Postavlja širinu oznake u točkama. Format oznake Rendered example
^LL Postavlja duljinu oznake u točkama. Format oznake Rendered example
^LH Pomakne izvor s kojeg se mjeri svaka pozicija polja. Format oznake Rendered example
^LS Pomakne svako polje lijevo za zadani broj točaka. Format oznake Rendered example
^LT Pomakne cijelu oznaku prema gore ili prema dolje za zadani broj redaka točaka. Format oznake Rendered example
^PO Ispisuje oznaku normalno (N) ili naopako (I). Format oznake Rendered example
^PM Ogleda cijelu oznaku horizontalno kada je postavljeno na Y. Format oznake Rendered example
^PQ Postavlja koliko oznaka za ispis; svaka se računa kao oznaka u pregledu. Format oznake Rendered example
^MU Mijenja jedinicu mjerenja na točke, inče ili milimetre. Format oznake Rendered example
^CI Odabire skup znakova. ^CI28 je UTF-8. Format oznake Rendered example
^FO Postavlja položaj polja: x, y koordinate u točkama od gornjeg lijevog kuta. Polja i položaj Rendered example
^FT Pozicionira polje po njegovoj osnovici umjesto gornjeg lijevog kuta. Polja i položaj Rendered example
^FD Tekst ili podaci barkoda trenutnog polja. Polja i položaj Rendered example
^FS Završava trenutno polje. Polja i položaj Rendered example
^FB Obavija tekst u blok sa širinom, brojem redaka i poravnanjem. Polja i položaj Rendered example
^FR Ispisuje polje bijelo na crnom preko onoga što je ispod. Polja i položaj Rendered example
^FH Omogućuje ^FD da sadrži hex escapeove poput _0D. Polja i položaj Rendered example
^FW Postavlja zadanu rotaciju za polja koja slijede. Polja i položaj Rendered example
^FN Imenuje varijabilno polje u pohranjenom formatu. Polja i položaj Rendered example
^FX Komentar. Pisač ignorira sve do sljedeće naredbe. Polja i položaj Rendered example
^SN Ispisuje broj koji se povećava s každom oznakom. Polja i položaj PartialRead but not drawn: the serial field is left out and copies aren't incremented (the same as Labelary's preview). Rendered example
^A Odabire font, rotaciju i veličinu za sljedeće tekstualno polje. Tekst i fontovi Rendered example
^A@ Odabire font prema njegovom imenu datoteke na pisaču. Tekst i fontovi Rendered example
^CF Postavlja font i veličinu koje se koriste kada polje nema ^A. Tekst i fontovi Rendered example
^TB Obavija tekstualno polje unutar okvira zadane širine i visine. Tekst i fontovi Rendered example
^CW Dodjeljuje naziv od jednog slova datoteci fonta. Tekst i fontovi Stores or recalls data; no image of its own
^BY Postavlja širinu modula, omjer širokog i uskog te visinu za barkode koji slijede. Barkodovi Rendered example
^BC Barcode kod 128, najčešći na oznakama za slanje. Barkodovi Rendered example
^B3 Barcode kod 39. Barkodovi Rendered example
^B2 Interpolirani 2 od 5 barkod, samo numerički. Barkodovi Rendered example
^BE EAN-13 maloprodajni barkod. Barkodovi Rendered example
^B8 EAN-8 maloprodajni barkod. Barkodovi Rendered example
^BU UPC-A maloprodajni barkod. Barkodovi Rendered example
^B9 UPC-E maloprodajni barkod. Barkodovi Rendered example
^BQ QR Kod. Podaci polja započinju razinom ispravka pogrešaka i načinom unosa, kao u ^FDQA,text. Barkodovi Rendered example
^BX Data Matrix 2D barkod. Barkodovi Rendered example
^B7 PDF417 uvršteni 2D barkod. Barkodovi Rendered example
^BO Aztek 2D barkod. Barkodovi Rendered example
^BD MaxiCode, koristi ga UPS. Barkodovi Rendered example
^B0 Aztec 2D barkod; ista naredba kao ^BO. Barkodovi Rendered example
^BA Code 93 barkod: gušći od Code 39, s dva ugrađena kontrolna znaka. Barkodovi Rendered example
^BK Codabar barkod, koristi se u bibliotekama, bankama krvi i nekim kurirskim službama. Barkodovi Rendered example
^BL LOGMARS barkod, američki vojni Code 39 s obaveznom kontrolnom znamenkom. Barkodovi Rendered example
^B1 Code 11 barkod, numerički, koristi se na telekomunikacijskoj opremi. Barkodovi Rendered example
^BM MSI (Modificirani Plessey) kod, numerički, korišten za oznake na policama. Barkodovi Rendered example
^BP Plessey kod, numerički, s kontrolnom znamenkom CRC. Barkodovi Rendered example
^BS Dodatak od 2 ili 5 znamenki otisnut pored UPC ili EAN koda. Barkodovi Rendered example
^BZ Barkodovi američke pošte: POSTNET, PLANET i Inteligentna pošta. Barkodovi Rendered example
^B5 USPS PLANET barkod. Barkodovi Rendered example
^BR GS1 DataBar (ranije RSS): kompaktni GTIN barkodovi za voće i povrće te kuponske. Barkodovi PartialGS1 DataBar types 1 to 6 are drawn. Type 6 (Expanded) encodes the data as written and scans the same as Labelary's, but its last characters can differ; types 7 to 12 (UPC/EAN composites) print the data as text. Rendered example
^BF MicroPDF417, manji PDF417 za male oznake. Barkodovi Rendered example
^GB Crtanje kutije ili linije: širina, visina, debljina granice, boja i zaobljenost. Grafika Rendered example
^GC Crtanje kruga: promjer, debljina granice i boja. Grafika Rendered example
^GE Crtanje elipse. Grafika Rendered example
^GD Crtanje dijagonalne linije. Grafika Rendered example
^GF Ugrađuje bitmap sliku u oznaku (ASCII hex, binarna ili Z64). Grafika Rendered example
^GS Ispisuje registrirani, autorski ili drugi simbol. Grafika Rendered example
^DF Pohranjuje format oznake na pisaču pod imenom. Pohranjeni formati i slike Rendered example
^XF Povlači pohranjeni format za popunjavanje njegovih ^FN polja. Pohranjeni formati i slike Rendered example
~DG Pohranjuje sliku na pisaču pod imenom. Pohranjeni formati i slike Stores or recalls data; no image of its own
^XG Ispisuje sliku pohranjenu s ~DG. Pohranjeni formati i slike Stores or recalls data; no image of its own
^IM Ispisuje pohranjenu sliku na trenutnom izvoru polja. Pohranjeni formati i slike Stores or recalls data; no image of its own

Ignored on purpose

These commands set up the printer, not the label. The API accepts them and renders the label as if they weren't there; we checked that the image is byte-identical without them.

GroupCommands
Media and sensors^MM, ^MN, ^MT, ^MF, ~JS
Speed, darkness and tear-off^PR, ~SD, ^MD, ~TA
Calibration and printer state~JC, ~JA, ~JR, ^JU, ~HS
Network, RFID setup and host queries^NC, ^NI, ^RS, ~HI, ~HM

Not supported yet

Each one was tested by placing it in a label at 8 dpmm. None of them fails the request: the label renders, without the symbol.

CommandSymbology or featureWhat the engine does today
^B4Code 49No bars; the data is printed as text (Labelary doesn't draw it either).
^BBCODABLOCKNo symbol; the data is printed as text (Labelary doesn't draw it either).
^BTTLC39No symbol; the data is printed as text (Labelary doesn't draw it either).

Known differences

  • A format with no fields, such as ^XA^XZ, returns 400 ERROR: No labels found in the ZPL instead of a blank image.
  • Fonts: Zebra's font 0 (CG Triumvirate Bold Condensed) can't be bundled, so ^A0 is drawn with Roboto Condensed Bold, with spacing calibrated per character. The bitmap fonts ^AA–^AH are drawn with DejaVu Sans Mono. Text widths can differ by a few dots from a given printer.
  • An RFID write (^RF followed by ^FD…^FS) draws its data as text; a printer encodes it in the tag and prints nothing.
  • EPL reverse text (the R flag of A) gets a black box the size of the character cells, as on the printer; it can run past the last character because the substitute font is narrower than EPL's bitmap fonts.

Prelazak s Labelary

The API keeps Labelary's v1 paths and headers, so most clients only change the host. See Migrate from Labelary for the tested differences and OpenZPL vs Labelary for the comparison.

Povratne informacije