ZPLServer for Windows, macOS & Linux

Convert, Preview & Render ZPL
commands to PNG, JPG & PDF!

Key Features

  Convert raw ZPL to PNG, JPG, PCX & PDF
  Print & Preview ZPL commands without wasting real labels!
  High Quality & Accuracy ZPL Rendering
  Forward ZPL rendering to any other servers and services
  Rest HTTP POST & Raw TCP Socket

Zebra and ZPL are registered trademarks of ZIH Corp.
ZPLServer
is not made by or endorsed by Zebra.


ZPL Server/Service ZPL Viewer ZPL Parser ZPL Converter ZPL Redirect Print ZPL2PNG ZPL2JPG ZPL2PCX ZPL2PDF ZPL2Image

Convert, Preview & Render ZPL commands

ZPLServer for Windows, macOS & Linux installs as a local service/daemon and allows you to Convert, Preview and Render raw ZPL (Zebra Programming Language) commands to well known image and document formats like PNG, JPG, PCX & PDF. It also can be configured to forward the ZPL output rendering to any other server/services (webhook)!

Features at a Glance

 ZPLServer Service/Daemon

ZPLServer installs as a local service/daemon. You can send raw ZPL commands from any software, application or service for file conversion or output forwarding.

 HTTP POST

Through a JSON payload, you can specify the ZPL commands, the DPI/Resolution, the Default Label Size, the Default Encoding (Code Page), and more... to the ZPLServer REST endpoint. Ideal for application integration.

 Raw TCP Socket

Just open a socket and write ZPL or JSON directly and get the output rendering ready for printing redirection.

 High Accuracy ZPL Render

ZPLServer renders ZPL commands generating high quality output by reproducing built-in and resident ZPL fonts for texts and barcodes with high accuracy. Custom Zebra Intellifont is also supported!

 Convert ZPL to Images & Docs

Use ZPLServer to easily convert ZPL commands to PNG, JPG, PCX & PDF. Just specify the Write To File action in the Settings web UI tab (zplserver --settings) or through a JSON payload.

 Forward ZPL Rendering

Use ZPLServer to easily forward the ZPL output rendering to any other server/service. Just specify the Forward action in the Settings web UI tab (zplserver --settings) or through a JSON payload.

 Barcode Symbologies Support

ZPLServer can generate most of the linear (1D), postal, composite, stacked and 2D barcodes shipped with real Zebra printer devices.

 Colored Label Simulation

ZPLServer can be configured to convert and print ZPL to PNG, JPG & PDF formats simulating a color ribbon (for label items) and a background color label. Black & White 1bpp is also supported through PCX format.

 On-Premise Licensing

ZPLServer is licensed for Private On-Premise environments. License is available for individual Windows, macOS & Linux devices or for Corporate-wide.

Quick Developer Guide

ZPLServer listens on a single TCP port 47321 and accepts ZPL commands in two ways:

  • HTTP POST — Send a JSON payload to a REST endpoint. Best for application integration.
  • Raw TCP socket — Open a socket and write ZPL or JSON directly. Best for printer emulation and legacy tools.

You can check the port currently in use under the Settings web UI tab (zplserver --settings), or run zplserver --port from the command line.

1 — Sending ZPL via HTTP (REST API)

ZPLServer exposes two HTTP endpoints on the same port used by the web interface.

Endpoint Method Body Response
/render POST JSON payload (see below) Rendered image/PDF binary (or ZIP for multi-label jobs)
/render POST JSON payload with "action": "writetofile" Saves the output to disk; same binary response
/render POST JSON payload with "action": "forward" Forwards output to the URL in forwardTo; same binary response
💡 The /render endpoint always returns the rendered bytes directly to the caller. The action field controls whether the output is also saved to disk or forwarded — it does not suppress the HTTP response.

JSON Payload Reference

Send Content-Type: application/json with a body like the example below. All fields are optional and fall back to the values configured in the Settings web UI tab (zplserver --settings).

{ "zplCommands": "^XA^FO30,40^ADN,36,20^FDHello World^FS^XZ", "zplCommandsCodePage": 850, "isZplCommandsBase64": false, "dpi": 203, "labelWidthInchUnit": 4, "labelHeightInchUnit": 6, "forceLabelWidth": false, "forceLabelHeight": false, "antiAlias": true, "labelBackColorHex": "#ffffff", "ribbonColorHex": "#000000", "compressionQuality": 100, "action": "writetofile", "fileFolder": "{Temp}/label_{Ticks}", "fileFormat": "PNG", "forwardTo": "" }
FieldTypeDefaultDescription
zplCommandsstringZPL II command string. Required.
zplCommandsCodePagenumber850Code page used to encode the ZPL string (e.g. 850, 1252, 65001 for UTF-8).
isZplCommandsBase64boolfalseSet to true if zplCommands is Base64-encoded.
dpinumber203Label printer DPI (203 or 300 are typical values).
labelWidthInchUnitnumber4Label width in inches.
labelHeightInchUnitnumber6Label height in inches.
forceLabelWidthboolfalseForce the rendered output to exactly the specified width.
forceLabelHeightboolfalseForce the rendered output to exactly the specified height.
antiAliasboolfalseEnable anti-aliasing for smoother output.
labelBackColorHexstring#ffffffLabel background color as a hex string (e.g. #ffffff).
ribbonColorHexstring#000000Ribbon/ink color as a hex string.
compressionQualitynumber100JPEG/PNG compression quality (1–100).
actionstringwritetofilewritetofile saves output to disk; forward POSTs output to forwardTo.
fileFolderstring{Temp}/label_{Ticks}Output folder path. Supports {ServiceData}, {Temp}, {Ticks} placeholders.
fileFormatstringPNGOutput format: PNG, JPG, PDF, PCX, PCL, GRF, EPL, FP, NV.
forwardTostring"Webhook URL to POST the rendered output to when action is forward.

HTTP Examples

  • Windows PowerShell — render to PNG and save to disk
    $body = @{ zplCommands = "^XA^FO30,40^ADN,36,20^FDHello World^FS^XZ" dpi = 203 labelWidthInchUnit = 4 labelHeightInchUnit= 6 action = "writetofile" fileFormat = "PNG" fileFolder = "{Temp}/labels" } | ConvertTo-Json Invoke-RestMethod -Method Post ` -Uri "http://localhost:47321/render" ` -ContentType "application/json" ` -Body $body ` -OutFile "label.png"
  • Windows PowerShell — receive raw bytes from /render
    $body = @{ zplCommands = "^XA^FO30,40^ADN,36,20^FDHello World^FS^XZ" dpi = 203 labelWidthInchUnit = 4 labelHeightInchUnit= 6 fileFormat = "PNG" } | ConvertTo-Json Invoke-RestMethod -Method Post ` -Uri "http://localhost:47321/render" ` -ContentType "application/json" ` -Body $body ` -OutFile "label.png"
  • macOS / Linux curl — render to PNG (binary output)
    curl -s -X POST http://localhost:47321/render \ -H "Content-Type: application/json" \ -d '{ "zplCommands": "^XA^FO30,40^ADN,36,20^FDHello World^FS^XZ", "dpi": 203, "labelWidthInchUnit": 4, "labelHeightInchUnit": 6, "fileFormat": "PNG" }' \ -o label.png
  • macOS / Linux curl — render to PDF and save to a folder
    curl -s -X POST http://localhost:47321/render \ -H "Content-Type: application/json" \ -d '{ "zplCommands": "^XA^FO30,40^ADN,36,20^FDHello World^FS^XZ", "dpi": 203, "fileFormat": "PDF", "action": "writetofile", "fileFolder": "{Temp}/labels" }' \ -o label.pdf
  • macOS / Linux curl — forward rendered output to a webhook
    curl -s -X POST http://localhost:47321/render \ -H "Content-Type: application/json" \ -d '{ "zplCommands": "^XA^FO30,40^ADN,36,20^FDHello World^FS^XZ", "fileFormat": "PNG", "action": "forward", "forwardTo": "https://my.server.com/label-webhook" }'

2 — Sending ZPL via Raw TCP Socket

ZPLServer listens on the same port for raw TCP connections. You can write either:

  • Plain ZPL commands (e.g. ^XA...^XZ) — the server uses the settings from the Settings web UI tab (zplserver --settings).
  • A complete JSON payload — the server parses it and applies any overrides before rendering.

This mode is compatible with any tool or language that can open a TCP socket: Zebra printers, legacy applications, scripts, etc.

💡 This is the same mechanism used when you install ZPLServer as a Standard TCP/IP printer port on Windows — the print spooler sends the raw ZPL stream directly over this socket.

Raw Socket Examples

  • Windows PowerShell — send raw ZPL over TCP
    $zpl = "^XA^FO30,40^ADN,36,20^FDHello World^FS^XZ" $port = 47321 $enc = [System.Text.Encoding]::GetEncoding(850) $client = New-Object System.Net.Sockets.TcpClient("127.0.0.1", $port) $stream = $client.GetStream() $bytes = $enc.GetBytes($zpl) $stream.Write($bytes, 0, $bytes.Length) $stream.Flush() $stream.Close() $client.Close()
  • Windows PowerShell — send JSON payload over TCP
    $json = @{ zplCommands = "^XA^FO30,40^ADN,36,20^FDHello World^FS^XZ" dpi = 203 labelWidthInchUnit = 4 labelHeightInchUnit= 6 fileFormat = "PDF" action = "writetofile" fileFolder = "{Temp}/labels" } | ConvertTo-Json -Compress $port = 47321 $enc = [System.Text.Encoding]::UTF8 $client = New-Object System.Net.Sockets.TcpClient("127.0.0.1", $port) $stream = $client.GetStream() $bytes = $enc.GetBytes($json) $stream.Write($bytes, 0, $bytes.Length) $stream.Flush() $stream.Close() $client.Close()
  • macOS / Linux nc (netcat) — send raw ZPL
    echo -n "^XA^FO30,40^ADN,36,20^FDHello World^FS^XZ" | nc 127.0.0.1 47321
  • macOS / Linux nc (netcat) — send a JSON payload from a file
    # Create payload.json first, then: nc 127.0.0.1 47321 < payload.json
  • Linux bash /dev/tcp — no extra tools needed
    ZPL="^XA^FO30,40^ADN,36,20^FDHello World^FS^XZ" exec 3>/dev/tcp/127.0.0.1/47321 printf "$ZPL" >&3 exec 3>&-

3 — Windows Virtual Printer Setup

On Windows you can configure ZPLServer as a Standard TCP/IP printer port. Any application that prints to this virtual printer will have its ZPL stream captured and processed by ZPLServer automatically.

  1. Open Devices and Printers:
    • Windows 11 / 10 Right-click Start → SettingsBluetooth & devicesPrinters & scanners
    • Windows 8 / 7 Start → Control PanelHardware and SoundDevices and Printers
  2. Click Add a printerThe printer that I want isn't listed.
  3. Select Add a local printer or network printer with manual settingsNext.
  4. Select Create a new port, choose Standard TCP/IP PortNext.
  5. Enter:
    • Host Name or IP Address: 127.0.0.1
    • Port Name: any name you like, e.g. ZPLServer_local
    • Uncheck Query the printer and automatically select the driver to use
  6. When prompted for a driver, choose any Generic / Text Only driver.
  7. After the port is created, open its PropertiesPorts tab → select the port → Configure Port and set the Port Number to match the value returned by ZPLServer.exe --port.
  8. Click Finish. The new printer will now forward all print jobs to ZPLServer.

4 — Command-Line Interface (CLI)

Run zplserver from a terminal with the following flags:

CommandDescription
zplserverStart the background service (normal mode).
zplserver --settingsOpen the Settings page in the default browser.
zplserver --logsOpen the Logs page in the default browser.
zplserver --portPrint the port ZPLServer is currently listening on.
zplserver --device-idPrint the unique Device ID for this installation (used for licensing).
zplserver --healthCheck whether the service is running. Exits with code 0 (OK) or 1 (FAIL).
zplserver --set-port <port>Change the listening port (hot-reload if running)
zplserver --set-license <key>Set the license key (hot-reload if running)
zplserver --docShow the doc page in the default browser.
zplserver --helpShow this summary in the console.
On Windows the service can be registered as a Windows Service via sc or the Services MMC snap-in, so it starts automatically at boot without any user logged in.
On macOS / Linux use launchd or systemd respectively — ZPLServer natively supports UseSystemd().

ZPL Commands Support

ZPLServer rendering engine supports most of the ZPL formatting and control commands. The following table lists the supported commands. Not listed or unsupported commands will be skipped in the parsing stage.

IMPORTANT NOTE
Barcode symbols, particularly 2D-type like QR Code, Data Matrix, Aztec Code, Maxicode..., might look different to the one printed by a real printer because Virtual ZPL Printer Driver leverages on its own barcode encoder. However, this does not mean that the rendered barcodes will not be readable at all.
Status ZPL Command Notes
^A Scalable/Bitmapped Font
^A@ Use Font Name to Call Font.FNT extension is not supported
^B0 Aztec Bar Code ParametersECICs and Structured Appended format are not supported
^B1 Code 11 Bar Code
^B2 Interleaved 2 of 5 Bar Code
^B3 Code 39 Bar Code
^B4 Code 49Starting mode is not supported
^B5 Planet Code bar code
^B7 PDF417 Bar Code
^B8 EAN-8 Bar Code
^B9 UPC-E Bar Code
^BA Code 93 Bar Code
^BB CodablockCodablock-F supported only
^BC Code 128 Bar Code (Subsets A, B, and C)
^BD UPS MaxiCode Bar Code
^BE EAN-13 Bar Code
^BF MicroPDF417 Bar Code
^BI Industrial 2 of 5 Bar Codes
^BJ Standard 2 of 5 Bar Code
^BK ANSI Codabar Bar Code
^BL LOGMARS Bar Code
^BM MSI Bar Code
^BO Aztec Bar Code ParametersECICs and Structured Appended format are not supported
^BP Plessey Bar Code
^BQ QR Code Bar CodeModel 1 and Data Encoding Switches are not supported
^BR GS1 Databar
^BS UPC/EAN Extensions
^BT TLC39
^BU UPC-A Bar Code
^BX Data Matrix Bar CodeQuality Level < 200 is not supported
^BY Bar Code Field Default
^BZ POSTAL Bar Code
^CC Change Caret
^CD Change Delimiter
^CF Change Alphanumeric Default Font
^CI Change International Font/EncodingCharacter remapping is not supported
^CT Change Tilde
^CW Font Identifier
~DB Download Bitmap Font
^DF Download Format
~DG Download Graphics
~DU Download Unbounded TrueType Font
~DY Download ObjectsAR-compressed format and bitmap, .pcx, .nrd, .pac, .wml, .htm, .get extensions are not supported
~EG Erase Download Graphics
^FA Field Allocate
^FB Field Block
^FC Field Clock
^FD Field Data
^FH Field Hexadecimal Indicator
^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
^ID Object Delete
^IL Image Load
^IM Image Move
^IS Image Save
~JR Power On Reset
^LH Label Home
^LL Label Length
^LR Label Reverse Print
^LS Label Shift
^LT Label Top
^MC Map Clear
^MU Set Units of Measurement
^PA Advanced Text Properties
^PM Printing Mirror Image of Label
^PO Print Orientation
^PQ Print Quantity
^PW Print Width
^RF Read or Write RFID FormatOnly Write mode is supported
^RQ Quick Write EPC Data and Passwords
^SF Serialization Field
^SL Set Mode and Language (for Real-Time Clock)
^SN Serialization Data
^SO Set Offset (for Real-Time Clock)
^ST Set Date and Time (for Real-Time Clock)
^TB Text Blocks
^TO Transfer Object
~WC Print Configuration Label
^XA Start Format
^XF Recall Format
^XG Recall Graphic
^XZ End Format
^WF Encode AFI or DSFID Byte
^WT Write (Encode) Tag