ข้ามไปที่เนื้อหา

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ทำหน้าที่อะไรCategoryEvidence
^XA เปิดป้าย ทุกอย่างจนถึง ^XZ คือป้ายหนึ่งป้าย รูปแบบฉลาก Rendered example
^XZ ปิดป้ายที่เปิดโดย ^XA และพิมพ์มัน. รูปแบบฉลาก Rendered example
^PW ตั้งค่าความกว้างป้ายวัดเป็นจุด. รูปแบบฉลาก Rendered example
^LL ตั้งค่าความยาวป้ายวัดเป็นจุด. รูปแบบฉลาก Rendered example
^LH ย้ายจุดเริ่มต้นที่แต่ละตำแหน่งฟิลด์ถูกวัดจาก. รูปแบบฉลาก Rendered example
^LS เลื่อนฟิลด์ทุกฟิลด์ไปทางซ้ายตามจำนวนจุดที่กำหนด. รูปแบบฉลาก Rendered example
^LT ย้ายป้ายทั้งหมดขึ้นหรือลงตามจำนวนแนวจุดที่กำหนด. รูปแบบฉลาก Rendered example
^PO พิมพ์ป้ายปกติ (N) หรือกลับหัว (I). รูปแบบฉลาก Rendered example
^PM สะท้อนป้ายทั้งหมดในแนวนอนเมื่อตั้งค่าเป็น Y. รูปแบบฉลาก Rendered example
^PQ ตั้งค่าจำนวนป้ายที่จะพิมพ์; ป้ายแต่ละอันจะนับเป็นป้ายในการแสดงตัวอย่าง. รูปแบบฉลาก Rendered example
^MU เปลี่ยนหน่วยการวัดเป็นจุด, นิ้วหรือมิลลิเมตร. รูปแบบฉลาก Rendered example
^CI เลือกชุดตัวอักษร. ^CI28 คือ UTF-8. รูปแบบฉลาก Rendered example
^FO ตั้งค่าตำแหน่งฟิลด์: พิกัด x, y วัดเป็นจุดจากมุมซ้ายบน. ฟิลด์และตำแหน่ง Rendered example
^FT วางฟิลด์ตามเส้นฐานแทนที่จะเป็นมุมบนซ้าย ฟิลด์และตำแหน่ง Rendered example
^FD ข้อมูลข้อความหรือบาร์โค้ดของฟิลด์ปัจจุบัน. ฟิลด์และตำแหน่ง Rendered example
^FS สิ้นสุดฟิลด์ปัจจุบัน. ฟิลด์และตำแหน่ง Rendered example
^FB หุ้มข้อความในบล็อกด้วยความกว้าง จำนวนบรรทัด และการจัดตำแหน่ง ฟิลด์และตำแหน่ง Rendered example
^FR พิมพ์ฟิลด์สีขาวบนสีดำเหนือสิ่งที่อยู่ด้านล่าง. ฟิลด์และตำแหน่ง Rendered example
^FH ให้ ^FD มีการหนี hex เช่น _0D. ฟิลด์และตำแหน่ง Rendered example
^FW ตั้งค่าการหมุนเริ่มต้นสำหรับฟิลด์ที่ตามมา. ฟิลด์และตำแหน่ง Rendered example
^FN ตั้งชื่อฟิลด์ตัวแปรในรูปแบบที่จัดเก็บ. ฟิลด์และตำแหน่ง Rendered example
^FX ความคิดเห็น เครื่องพิมพ์จะละเลยทุกอย่างจนถึงคำสั่งถัดไป ฟิลด์และตำแหน่ง Rendered example
^SN พิมพ์หมายเลขที่เพิ่มขึ้นในแต่ละป้าย. ฟิลด์และตำแหน่ง PartialRead but not drawn: the serial field is left out and copies aren't incremented (the same as Labelary's preview). Rendered example
^A เลือกฟอนต์ การหมุน และขนาดสำหรับฟิลด์ข้อความถัดไป. ข้อความและฟอนต์ Rendered example
^A@ เลือกฟอนต์ตามชื่อไฟล์ของมันบนเครื่องพิมพ์. ข้อความและฟอนต์ Rendered example
^CF ตั้งค่าฟอนต์และขนาดที่ใช้เมื่อฟิลด์ไม่มี ^A. ข้อความและฟอนต์ Rendered example
^TB หุ้มฟิลด์ข้อความภายในกล่องที่มีความกว้างและความสูงที่กำหนด ข้อความและฟอนต์ Rendered example
^CW กำหนดชื่อแบบตัวอักษรเป็นตัวอักษรเดียวให้กับไฟล์ฟอนต์. ข้อความและฟอนต์ Stores or recalls data; no image of its own
^BY ตั้งค่าความกว้างของโมดูล อัตราส่วนกว้างต่อแคบ และความสูงสำหรับบาร์โค้ดที่ตามมา. บาร์โค้ด Rendered example
^BC บาร์โค้ดรหัส 128, ที่พบได้บ่อยที่สุดบนป้ายจัดส่ง. บาร์โค้ด Rendered example
^B3 บาร์โค้ดรหัส 39. บาร์โค้ด Rendered example
^B2 รหัสบาร์ Interleaved 2 ของ 5, เฉพาะตัวเลขเท่านั้น. บาร์โค้ด Rendered example
^BE บาร์โค้ดค้าปลีก EAN-13. บาร์โค้ด Rendered example
^B8 บาร์โค้ดค้าปลีก EAN-8. บาร์โค้ด Rendered example
^BU บาร์โค้ดค้าปลีก UPC-A. บาร์โค้ด Rendered example
^B9 บาร์โค้ดค้าปลีก UPC-E. บาร์โค้ด Rendered example
^BQ รหัส QR ข้อมูลในฟิลด์เริ่มต้นด้วยระดับการแก้ไขข้อผิดพลาดและโหมดการป้อนข้อมูล เช่น ^FDQA,text. บาร์โค้ด Rendered example
^BX บาร์โค้ด 2 มิติ Data Matrix. บาร์โค้ด Rendered example
^B7 บาร์โค้ด 2D แบบซ้อน PDF417 บาร์โค้ด Rendered example
^BO บาร์โค้ด 2D อัซเทค. บาร์โค้ด Rendered example
^BD MaxiCode ที่ใช้โดย UPS. บาร์โค้ด Rendered example
^B0 บาร์โค้ด 2D Aztec; คำสั่งเดียวกับ ^BO. บาร์โค้ด Rendered example
^BA บาร์โค้ด Code 93: หนาแน่นกว่าบาร์โค้ด Code 39, มีตัวตรวจสอบในตัวสองตัว. บาร์โค้ด Rendered example
^BK บาร์โค้ด Codabar, ใช้โดยห้องสมุด, ธนาคารเลือด และผู้จัดส่งบางราย. บาร์โค้ด Rendered example
^BL บาร์โค้ด LOGMARS, รหัส 39 ของกองทัพสหรัฐอเมริกาที่มีเลขตรวจสอบบังคับ. บาร์โค้ด Rendered example
^B1 บาร์โค้ด Code 11, จำนวน, ใช้กับอุปกรณ์โทรคมนาคม. บาร์โค้ด Rendered example
^BM บาร์โค้ด MSI (Modified Plessey) ตัวเลข ใช้ในป้ายบนชั้นวาง. บาร์โค้ด Rendered example
^BP บาร์โค้ด Plessey ตัวเลข พร้อมด้วยตัวตรวจสอบ CRC. บาร์โค้ด Rendered example
^BS ส่วนเพิ่มเติม 2 หรือ 5 หลักที่พิมพ์ถัดจากรหัส UPC หรือ EAN. บาร์โค้ด Rendered example
^BZ บาร์โค้ดไปรษณีย์ของสหรัฐ: POSTNET, PLANET และ Intelligent Mail. บาร์โค้ด Rendered example
^B5 บาร์โค้ด USPS PLANET. บาร์โค้ด Rendered example
^BR GS1 DataBar (เดิมคือ RSS): บาร์โค้ด GTIN ที่กะทัดรัดสำหรับผลผลิตและคูปอง. บาร์โค้ด 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, PDF417 ขนาดเล็กกว่าสำหรับป้ายขนาดเล็ก. บาร์โค้ด Rendered example
^GB วาดกล่องหรือเส้น: ความกว้าง, ความสูง, ความหนาของขอบ, สีและการโค้ง. กราฟิก Rendered example
^GC วาดวงกลม: เส้นผ่านศูนย์กลาง, ความหนาของขอบและสี. กราฟิก Rendered example
^GE วาดรูปไข่. กราฟิก Rendered example
^GD วาดเส้นทแยงมุม. กราฟิก Rendered example
^GF ฝังภาพบิตแมพในป้าย (ASCII hex, ไบนารี หรือ Z64). กราฟิก Rendered example
^GS พิมพ์สัญลักษณ์ที่จดทะเบียน ลิขสิทธิ์ หรือสัญลักษณ์อื่นๆ. กราฟิก Rendered example
^DF เก็บรูปแบบป้ายไว้ในเครื่องพิมพ์ภายใต้ชื่อ. รูปแบบและภาพที่เก็บไว้ Rendered example
^XF เรียกรูปแบบที่เก็บไว้เพื่อนำมาเติมในฟิลด์ ^FN. รูปแบบและภาพที่เก็บไว้ Rendered example
~DG เก็บภาพไว้ในเครื่องพิมพ์ภายใต้ชื่อ. รูปแบบและภาพที่เก็บไว้ Stores or recalls data; no image of its own
^XG พิมพ์ภาพที่เก็บไว้ด้วย ~DG. รูปแบบและภาพที่เก็บไว้ Stores or recalls data; no image of its own
^IM พิมพ์ภาพที่เก็บไว้ที่จุดเริ่มต้นของฟิลด์ปัจจุบัน. รูปแบบและภาพที่เก็บไว้ 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.

ย้ายจาก 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.

ข้อเสนอแนะแสดงความคิดเห็น