ZPLPrinter Web API for Docker

Self-hosted REST API to Convert ZPL
to PDF, PNG, JPG & more!


  Download   Buy

Key Features

  Convert raw ZPL to PDF, PNG, JPG, TIFF, PCX, GRF, EPL & PCL
  Preview ZPL commands without wasting real labels!
  High Quality & Accuracy ZPL Rendering
  ZPL Parsing from Raw & Base64 Strings
  International Text & Barcodes Support
  Docker image for amd64 & arm64, any language via HTTP

Zebra and ZPL are registered trademarks of ZIH Corp.
ZPLPrinter Web API for Docker
is not made by or endorsed by Zebra.

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

ZPLPrinter Web API for Docker allows you to Convert, Preview and Render raw ZPL (Zebra Programming Language) commands to well known image and document formats like PNG, JPG, PDF, TIFF, PCX, Zebra GRF ASCII hex, Zebra EPL Binary Graphic, Honeywell-Intermec FingerPrint Binary Graphic, EPSON ESC/POS NV Binary Graphic & HP PCL Binary Graphic from Any Development Platform and Programming Languages (.NET, Java, PHP, Javascript, Python, Ruby, and more!) with a single HTTP POST.

It ships as a Linux Docker image for amd64 and arm64 that you run on your own servers, Kubernetes cluster or cloud account. Your ZPL and label data never leave your infrastructure. If you prefer an in-process library for .NET, see the ZPLPrinter Emulator SDK for .NET.

ZPL Virtual Printer ZPL Viewer ZPL Parser ZPL Converter ZPL Emulator ZPL2PNG ZPL2JPG ZPL2PCX ZPL2TIFF ZPL2GRF ZPL2PDF ZPL2Image ZPL2EPL ZPL2FingerPrint ZPL2ESCPOS ZPL2PCL ZPL Docker ZPL Web API

Quick Start: ZPL to PDF in 2 Commands

1. Run the container

docker run -d -p 8080:8080 neodynamic/zplprinterwebapi:7.0.1

# ARM64 (AWS Graviton, Raspberry Pi...)
docker run -d -p 8080:8080 neodynamic/zplprinterwebapi:7.0.1-arm64

2. POST your ZPL, get a PDF

curl -X POST "http://localhost:8080/ZPLPrinter" \
     -H "Content-Type: application/json" \
     -H "Accept: application/pdf" \
     -d '{"zplCommands":"^XA^FO30,40^ADN,36,20^FDHello World^FS^FO30,80^BY4^B3N,,200^FD12345678^FS^XZ","dpi":203,"labelWidthInchUnit":4,"labelHeightInchUnit":6}' \
     --output label.pdf

Change the Accept header to image/png, image/jpeg, image/tiff, application/vnd.epl, application/vnd.hp-pcl... to get other formats. See samples in Python, Node.js, Java, PHP, C# and more.


Postman Screenshots

ZPL Commands Sample 1
ZPL Commands Sample 2
ZPL Commands Sample 3
ZPL Commands Sample 4

Features at a Glance

 Convert ZPL to Images & Docs

Use ZPLPrinter Web API for Docker to easily convert ZPL commands to PNG, JPG, PDF, TIFF, PCX, Zebra GRF ASCII hex, Zebra EPL Binary Graphic, Honeywell-Intermec FingerPrint Binary Graphic, EPSON ESC/POS NV Binary Graphic & HP PCL Binary Graphic formats with a single HTTP POST from any programming language.

 Preview ZPL Commands

Need to test ZPL commands and don't have a real Zebra printer device? No problem! Use ZPLPrinter Web API for Docker to preview ZPL commands without wasting any single label!

 High Accuracy ZPL Render

ZPLPrinter Web API for Docker renders ZPL commands generating high quality output by reproducing built-in and resident ZPL fonts for texts and barcodes with high accuracy.

 ZPL Parsing & Processing

ZPLPrinter Web API for Docker receives the ZPL commands in the JSON request body as a plain string or as Base64 (useful for commands with non-printable chars), with a configurable code page / encoding (default 850). Most of the ZPL Formatting and Control Commands are supported.

 International Text Support

ZPLPrinter Web API for Docker can render ZPL commands for international text including Latin, EMEA, Asian and RTL languages like German, French, Italian, Spanish, Portuguese, Swedish, Danish, Polish, Cyrillic, Greek, Chinese, Japanese, Korean, Arabic, Hebrew, and more. Custom Font Files are also supported!

 Barcode Symbologies Support

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

 Colored Label Simulation

ZPLPrinter Web API for Docker can be configured to convert 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.

 Custom ZPL Output Rotation

Besides ZPL rotation command, ZPLPrinter Web API for Docker can be configured to rotate ZPL outputs to 90, 180 & 270 clockwise degrees.

 Custom Background Image

ZPLPrinter Web API for Docker allows you to render ZPL commands on a specified Background Image (in PNG or JPG formats) sent as a Base64 string in the request.

 Custom Paper Size

For PDF, TIFF and PCL output, set paperWidth, paperHeight and paperOrientation to get a fixed page size (e.g. Letter or A4) with the rendered label centered on each page.

 Watermark & Thumbnails

Stamp a custom watermark image with adjustable opacity on top of the label, and generate thumbnails of the output by specifying their size in pixels.

 Rendered Elements Tracing

With JSON output and traceRenderedElements, get the list of rendered ZPL elements with their position and size, useful for post-processing. Use renderOutputIndexes to return only some labels.

Overview

Designed by following some of the REST principles, ZPLPrinter Web API for Docker responds to a simple HTTP POST by specifying the ZPL commands and printer settings through a JSON object in the request body, returning the output rendering in the image or document format specified through the Accept header.

Help Doc Topics


Download and run ZPLPrinter Web API for Docker

ZPLPrinter Web API for Docker is available at Docker Hub registry.

  • To pull/download the Docker image, please type the following from a Terminal:

    AMD
    docker pull neodynamic/zplprinterwebapi:7.0.1
    ARM
    docker pull neodynamic/zplprinterwebapi:7.0.1-arm64
  • To run the Docker image, please type the following from a Terminal:

    AMD
    docker run -it --rm -p 8080:8080 neodynamic/zplprinterwebapi:7.0.1
    ARM
    docker run -it --rm -p 8080:8080 neodynamic/zplprinterwebapi:7.0.1-arm64

    Special Parameters

    • Auto HTTPS Redirection: By default, HTTPS redirection is enabled. It can be disabled by specifying the following parameter -e "USE_HTTPS_REDIRECTION=false"
    • Swagger UI: By default, Swagger UI is enabled. It can be disabled by specifying the following parameter -e "SWAGGER_UI_ENABLED=false"

Run ZPLPrinter WebAPI on a Custom Port

By default, our Docker image exposes port 8080 only. If you want to expose and use another different port, then do the following.

  1. Let's suppose you want to use port 12345, then run the docker image with the following parameters:

    AMD
    docker run -it --rm -p 8080:12345 neodynamic/zplprinterwebapi:7.0.1 -e ASPNETCORE_HTTP_PORTS=12345
    ARM
    docker run -it --rm -p 8080:12345 neodynamic/zplprinterwebapi:7.0.1-arm64 -e ASPNETCORE_HTTP_PORTS=12345
  2. Special case for port 80: If you need to use port 80, then run the docker image with the following parameters:

    AMD
    docker run -it --rm -p 8080:80 neodynamic/zplprinterwebapi:7.0.1 -u root -e ASPNETCORE_HTTP_PORTS=80
    ARM
    docker run -it --rm -p 8080:80 neodynamic/zplprinterwebapi:7.0.1-arm64 -u root -e ASPNETCORE_HTTP_PORTS=80

How To Use It - Basic Sample

The following source code invokes the ZPLPrinter Web API for Docker to generate a PNG image for the specified ZPL Commands. For more advanced settings please refer to the ZPLPrintJob JSON Object


                    
curl -X POST "http://localhost:8080/ZPLPrinter" \
     -H  "Accept: image/png" \
     -H  "Content-Type: application/json" \
     -d "{\"zplCommands\":\"^XA^FO30,40^ADN,36,20^FDHello World^FS^FO30,80^BY4^B3N,,200^FD12345678^FS^XZ\"}" \
     --output label.png
                        
                

                    
$data = array(
  'zplCommands' => '^XA^FO30,40^ADN,36,20^FDHello World^FS^FO30,80^BY4^B3N,,200^FD12345678^FS^XZ'
);

$options = array(
  'http' => array(
    'method'  => 'POST',
    'content' => json_encode( $data ),
    'header' =>  "Content-Type: application/json\r\n" .
                "Accept: image/png\r\n"
    )
);

$context  = stream_context_create( $options );
$url = 'http://localhost:8080/ZPLPrinter';
$response = file_get_contents( $url, false, $context );
file_put_contents('label.png', $response);
                        
                

                    
require 'net/http'
require 'uri'
require 'json'

uri = URI.parse("http://localhost:8080/ZPLPrinter")

header = {'Accept':'image/png', 'Content-Type': 'application/json'}

data = {zplCommands: '^XA^FO30,40^ADN,36,20^FDHello World^FS^FO30,80^BY4^B3N,,200^FD12345678^FS^XZ'}

http = Net::HTTP.new(uri.host, uri.port)
request = Net::HTTP::Post.new(uri.request_uri, header)
request.body = data.to_json

response = http.request(request)

open('/tmp/label.png', 'wb' ) { |file|
    file.write(response.body)
}
                        
                

                    
import requests
import json

url = "http://localhost:8080/ZPLPrinter"

jsondata = json.dumps( {"zplCommands": "^XA^FO30,40^ADN,36,20^FDHello World^FS^FO30,80^BY4^B3N,,200^FD12345678^FS^XZ"} )

headers = {
    'content-type': "application/json",
    'accept': "image/png"
    }

response = requests.request("POST", url, data=jsondata, headers=headers)

if response.status_code == 200:
    with open("label.png", 'wb') as f:
        f.write(response.content)

                        
                

                    
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
my $server_endpoint = "http://localhost:8080/ZPLPrinter";
my $req = HTTP::Request->new(POST => $server_endpoint);
$req->header('content-type' => 'application/json');
$req->header('accept' => 'image/png');

my $post_data = '{ "zplCommands" : "^XA^FO30,40^ADN,36,20^FDHello World^FS^FO30,80^BY4^B3N,,200^FD12345678^FS^XZ" }';

$req->content($post_data);

my $resp = $ua->request($req);
open FILEHANDLE, ">label.png";
print FILEHANDLE $resp->{_content};
close FILEHANDLE;
                        
                

                    
CloseableHttpClient client = HttpClients.createDefault();
HttpPost httpPost = new HttpPost("http://localhost:8080/ZPLPrinter");
 
String json = "{\"zplCommands\" : \"^XA^FO30,40^ADN,36,20^FDHello World^FS^FO30,80^BY4^B3N,,200^FD12345678^FS^XZ\"}";
StringEntity body = new StringEntity(json);
httpPost.setEntity(body);
httpPost.setHeader("Accept", "image/png");
httpPost.setHeader("Content-type", "application/json");
 
CloseableHttpResponse response = client.execute(httpPost);
HttpEntity result = response.getEntity();
if (result != null) {
    try (FileOutputStream outstream = new FileOutputStream(new File("label.png"))) {
        result.writeTo(outstream);
    }
}
client.close();     
                        
                

                    
using var http = new HttpClient();

var json = "{\"zplCommands\":\"^XA^FO30,40^ADN,36,20^FDHello World^FS^FO30,80^BY4^B3N,,200^FD12345678^FS^XZ\"}";
var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost:8080/ZPLPrinter")
{
    Content = new StringContent(json, Encoding.UTF8, "application/json")
};
request.Headers.Accept.ParseAdd("image/png");

var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();
await File.WriteAllBytesAsync("label.png", await response.Content.ReadAsByteArrayAsync());
                        
                

                    
// Browser (inside a <script type="module">): render the label in an img element
const response = await fetch("http://localhost:8080/ZPLPrinter", {
    method: "POST",
    headers: { "Content-Type": "application/json", "Accept": "image/png" },
    body: JSON.stringify({
        zplCommands: "^XA^FO30,40^ADN,36,20^FDHello World^FS^FO30,80^BY4^B3N,,200^FD12345678^FS^XZ"
    })
});
const blob = await response.blob();
document.getElementById("label").src = URL.createObjectURL(blob);
                        
                

                    
// Node.js 18+ (built-in fetch). Save as convert.mjs (ES module, top-level await)
import fs from "fs";

const response = await fetch("http://localhost:8080/ZPLPrinter", {
    method: "POST",
    headers: { "Content-Type": "application/json", "Accept": "image/png" },
    body: JSON.stringify({
        zplCommands: "^XA^FO30,40^ADN,36,20^FDHello World^FS^FO30,80^BY4^B3N,,200^FD12345678^FS^XZ"
    })
});
fs.writeFileSync("label.png", Buffer.from(await response.arrayBuffer()));
                        
                

The Accept Header

The desired output rendering format must be specified through the Accept header. The supported formats are the following:

Accept Description
image/png Returns the first rendered label in PNG format. If the specified commands generate more than one label, then you should specify image/png+json or image/png+zip values instead.
image/jpeg Returns the first rendered label in JPEG/JPG format. If the specified commands generate more than one label, then you should specify image/jpeg+json or image/jpeg+zip values instead.
application/pdf Returns all the rendered labels as a single PDF document. The PDF file will contain as many pages as rendered labels.
image/tiff Returns all the rendered labels as a single TIFF image. The TIFF file will contain as many pages as rendered labels.
image/vnd.zbrush.pcx Returns the first rendered label in PCX format. If the specified commands generate more than one label, then you should specify image/vnd.zbrush.pcx+json or image/vnd.zbrush.pcx+zip values instead.
application/vnd.zpl Returns the first rendered label in Zebra GRF ASCII Hex format. If the specified commands generate more than one label, then you should specify application/vnd.zpl+json or application/vnd.zpl+zip values instead.
application/vnd.epl Returns the first rendered label in Zebra EPL Binary Graphic format. If the specified commands generate more than one label, then you should specify application/vnd.epl+json or application/vnd.epl+zip values instead.
application/vnd.fingerprint Returns the first rendered label in Honeywell-Intermec FingerPrint Binary format. If the specified commands generate more than one label, then you should specify application/vnd.fingerprint+json or application/vnd.fingerprint+zip values instead.
application/vnd.escpos Returns the first rendered label in EPSON ESC/POS NV Binary format. If the specified commands generate more than one label, then you should specify application/vnd.escpos+json or application/vnd.escpos+zip values instead.
application/vnd.hp-pcl Returns the first rendered label in HP PCL Binary format. If the specified commands generate more than one label, then you should specify application/vnd.hp-pcl+json or application/vnd.hp-pcl+zip values instead.
image/png+json Returns all the rendered labels as a JSON Array containing each label in Base64 PNG Data URI scheme. The returned JSON Object will have this structure: {labels:["data:image/png;base64,<BASE64-STRING>", "data:image/png;base64,<BASE64-STRING>", ... ]}
image/jpeg+json Returns all the rendered labels as a JSON Array containing each label in Base64 JPEG Data URI scheme. The returned JSON Object will have this structure: {labels:["data:image/jpeg;base64,<BASE64-STRING>", "data:image/jpeg;base64,<BASE64-STRING>", ... ]}
application/pdf+json Returns all the rendered labels as a JSON Array containing a single PDF in Base64 Data URI scheme. The PDF file will contain as many pages as rendered labels. The returned JSON Object will have this structure: {labels:["data:application/pdf;base64,<BASE64-STRING>"]}
image/tiff+json Returns all the rendered labels as a JSON Array containing a single TIFF in Base64 Data URI scheme. The TIFF file will contain as many pages as rendered labels. The returned JSON Object will have this structure: {labels:["data:image/tiff;base64,<BASE64-STRING>"]}
image/vnd.zbrush.pcx+json Returns all the rendered labels as a JSON Array containing each label in Base64 PCX Data URI scheme. {labels:["data:image/vnd.zbrush.pcx;base64,<BASE64-STRING>", "data:image/vnd.zbrush.pcx;base64,<BASE64-STRING>", ... ]}
application/vnd.zpl+json Returns all the rendered labels as a JSON Array containing each label in Base64 Zebra GRF ASCII Hex Data URI scheme. The returned JSON Object will have this structure: {labels:["data:application/vnd.zpl;base64,<BASE64-STRING>", "data:application/vnd.zpl;base64,<BASE64-STRING>", ... ]}
application/vnd.epl+json Returns all the rendered labels as a JSON Array containing each label in Base64 Zebra EPL Binary Graphic Data URI scheme. The returned JSON Object will have this structure: {labels:["data:application/vnd.epl;base64,<BASE64-STRING>", "data:application/vnd.epl;base64,<BASE64-STRING>", ... ]}
application/vnd.fingerprint+json Returns all the rendered labels as a JSON Array containing each label in Base64 Honeywell-Intermec FingerPrint Binary Data URI scheme. The returned JSON Object will have this structure: {labels:["data:application/vnd.fingerprint;base64,<BASE64-STRING>", "data:application/vnd.fingerprint;base64,<BASE64-STRING>", ... ]}
application/vnd.escpos+json Returns all the rendered labels as a JSON Array containing each label in Base64 EPSON ESC/POS NV Binary Data URI scheme. The returned JSON Object will have this structure: {labels:["data:application/vnd.escpos;base64,<BASE64-STRING>", "data:application/vnd.escpos;base64,<BASE64-STRING>", ... ]}
application/vnd.hp-pcl+json Returns all the rendered labels as a JSON Array containing each label in Base64 HP PCL Binary Data URI scheme. The returned JSON Object will have this structure: {labels:["data:application/vnd.hp-pcl;base64,<BASE64-STRING>", "data:application/vnd.hp-pcl;base64,<BASE64-STRING>", ... ]}
image/png+zip Returns all the rendered labels as a ZIP file containing each label in PNG format. Each file name is named to Label_01.png, Label_02.png, etc.
image/jpeg+zip Returns all the rendered labels as a ZIP file containing each label in JPEG/JPG format. Each file name is named to Label_01.jpg, Label_02.jpg, etc.
application/pdf+zip Returns all the rendered labels as a ZIP file containing a single PDF. The PDF file will contain as many pages as rendered labels. Label_01.pdf
image/tiff+zip Returns all the rendered labels as a ZIP file containing a single TIFF. The TIFF file will contain as many pages as rendered labels. Label_01.tiff
image/vnd.zbrush.pcx+zip Returns all the rendered labels as a ZIP file containing each label in PCX format. Each file name is named to Label_01.pcx, Label_02.pcx, etc.
application/vnd.zpl+zip Returns all the rendered labels as a ZIP file containing each label in Zebra GRF ASCII Hex format. Each file name is named to Label_01.grf, Label_02.grf, etc.
application/vnd.epl+zip Returns all the rendered labels as a ZIP file containing each label in Zebra EPL Binary Graphic format. Each file name is named to Label_01.epl, Label_02.epl, etc.
application/vnd.fingerprint+zip Returns all the rendered labels as a ZIP file containing each label in Honeywell-Intermec FingerPrint Binary format. Each file name is named to Label_01.fp, Label_02.fp, etc.
application/vnd.escpos+zip Returns all the rendered labels as a ZIP file containing each label in EPSON ESC/POS NV Binary format. Each file name is named to Label_01.nv, Label_02.nv, etc.
application/vnd.hp-pcl+zip Returns all the rendered labels as a ZIP file containing each label in HP PCL Binary format. Each file name is named to Label_01.pcl, Label_02.pcl, etc.

Web API Doc

Interactive OpenAPI reference. The same swagger.json is used by the Swagger UI built into the container (enabled by default). All request properties are also listed in The ZPLPrintJob Object.


The ZPLPrintJob Object

The ZPLPrintJob is the JSON Object sent in the body of POST /ZPLPrinter. It specifies the ZPL commands (the only required property) and the printer settings like DPI, label size, colors, background and watermark images, paper size and format options.

{
  "zplCommands": "^XA^FO30,40^ADN,36,20^FDHello World^FS^FO30,80^BY4^B3N,,200^FD12345678^FS^XZ",
  "dpi": 203,
  "labelWidthInchUnit": 4,
  "labelHeightInchUnit": 6,
  "renderOutputRotation": 0,
  "paperWidth": 8.5,
  "paperHeight": 11,
  "paperOrientation": "Portrait"
}
PropertyTypeDefaultDescription
dpiinteger203The printer resolution in DPI (Dots per inch) value. Valid values are: 152 (6 dpmm), 203 (8 dpmm), 300 (12 dpmm) or 600 (24 dpmm).
zplCommands REQUIREDstringThe ZPL commands to be processed. The string containing the ZPL commands is converted to an array of bytes prior processing it. That conversion will use CodePage or Encoding 850 (Latin Character Set).
zplCommandsCodePageinteger850The Encoding or CodePage of the ZPL string content. Default is CodePage 850 (Latin Character Set). Valid CodePage numbers are listed here github.com/neodynamic/ZPL-Printer-Web-API-Docker
isZplCommandsBase64booleanfalseWhether the specified ZPL Commands string is in Base64 format. Useful for ZPL commands containing non-readable/printable chars. Default is false.
renderOutputRotationintegerThe rotation for the output rendering process. Default is 0 (None). Valid values are: 0 (None), 90 (Clockwise), 180, 270 (Clockwise).
antiAliasbooleantrueWhether anti-aliasing rendering is enabled. Default is true.
labelWidthInchUnitnumber4The default label width in Inch units. Default is 4in.
labelHeightInchUnitnumber6The default label height in Inch units. Default is 6in.
labelBackColorHexstringThe label's background color in hex notation. Default is #fff (White).
ribbonColorHexstringThe label's ribbon color in hex notation. Default is #000 (Black).
backgroundImageBase64stringThe label's custom background image from a string in Base64 format. Image format must be PNG or JPG.
watermarkImageBase64stringThe label's watermark image from a string in Base64 format. Image format must be PNG or JPG.
watermarkOpacityintegerThe label's watermark image opacity level. Values range from 0 to 100. Default is 50.
drawRFIDbooleanWhether a RFID image must be drawn on the label. The RFID will be drawn if any supported RFID commands are found in the label. Default is true.
thumbnailSizePixelUnitinteger0The thumbnail size for the output rendering in Pixel unit. Default is 0 (zero) which means thumbnail generation is disabled.
pdfMetadataAuthorstringThe PDF Metadata Author attribute.
pdfMetadataCreatorstringThe PDF Metadata Creator attribute.
pdfMetadataProducerstringThe PDF Metadata Producer attribute.
pdfMetadataSubjectstringThe PDF Metadata Subject attribute.
pdfMetadataTitlestringThe PDF Metadata Title attribute.
forceLabelHeightbooleanfalseWhether the LabelHeight property value must override the ^LL command. Default is false.
forceLabelWidthbooleanfalseWhether the LabelWidth property value must override the ^PW command. Default is false.
invertColorsbooleanfalseWhether to invert the colors of the output image. Default is false.
compressionQualityinteger100The compression quality level to use for the output image. Values range from 0 to 100.
traceRenderedElementsbooleanfalseWhether to trace the ZPL elements rendered based on the ZPL commands to be processed. Only available for JSON output. Default is false.
enableGraphicsCachebooleanfalseWhether the ^GF commands output rendering should be cached or not. Default is false.
enablePrintingbooleanfalseWhether the output rendering should be formatted for printing scenarios. Default is false.
enablePngCompressionbooleantrueWhether PNG compression is enabled. Default is true;
renderOutputIndexesstringThe list of indexes (as a comma separated list) which the rendered outputs must be filtered by. It must be a Zero-indexed list.
paperHeightnumber0The paper/page height in inches, used for output in PDF, TIFF and PCL format. When both paperWidth and paperHeight are greater than 0, the generated PDF, TIFF or PCL output uses the specified paper size instead of a page sized to the label, with the rendered label centered on each page. Use paperOrientation to control whether the larger of these two values is used as the page width (Landscape) or page height (Portrait). Default is 0.
paperWidthnumber0The paper/page width in inches, used for output in PDF, TIFF and PCL format. When both paperWidth and paperHeight are greater than 0, the generated PDF, TIFF or PCL output uses the specified paper size instead of a page sized to the label, with the rendered label centered on each page. Use paperOrientation to control whether the larger of these two values is used as the page width (Landscape) or page height (Portrait). Default is 0.
paperOrientationenum: Portrait | LandscapePortraitThe orientation applied to paperWidth and paperHeight when computing the fixed page size for output in PDF, TIFF and PCL format. Default is Portrait.
pclCompressionbooleanfalseWhether the output PCL must be compressed. Default is False.
pclMonochromebooleanfalseWhether the output PCL must be monochrome. Default is False.
tiffCompressionenum: None | CCITTG4 | Deflate | PackBitsNoneThe TIFF compression. Default is None.
tiffPixelFormatenum: Bilevel | Grayscale8 | Rgb24 | Rgba32BilevelThe TIFF pixel format. Default is Bilevel.

Errors

Successful requests return HTTP 200 with the output in the format requested by the Accept header. If an error occurs while processing the ZPLPrintJob, the API returns HTTP 500 with a ProblemDetails JSON object:

{
  "type": "string",
  "title": "string",
  "status": 500,
  "detail": "string",
  "instance": "string"
}

If you get this error with valid ZPL, please contact our support team.


ZPL Commands Support

ZPLPrinter Web API for Docker supports most of the ZPL formatting and control commands. The following table lists the supported commands as well as the ones which are under work. 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 ZPLPrinter Web API for Docker leverages on its own barcode encoder. However, this does not mean that the rendered barcodes will not be readable at all.
Status ZPL Command Comments
^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
^FE Field Concatenation
^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
^JM Set Dots per Millimeter
~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

Licensing

On-Premise - Full Deployment Control

ZPLPrinter Web API is licensed for Private On-Premise environments giving you full control on the infrastructure where our product will run on. Please refer to Licensing model and prices...

 License Registration

When you buy a commercial license of ZPLPrinter Web API for Docker, you are provided with license information (LicenseOwner & LicenseKey) to register the product. The license information must be specified to the Docker image as environment variables as follows:

AMD
docker run -it --rm -e "LICENSE_OWNER=YOUR-COMPANY-NAME" -e "LICENSE_KEY=YOUR_KEY" -p 8080:8080 neodynamic/zplprinterwebapi:7.0.1
ARM
docker run -it --rm -e "LICENSE_OWNER=YOUR-COMPANY-NAME" -e "LICENSE_KEY=YOUR_KEY" -p 8080:8080 neodynamic/zplprinterwebapi:7.0.1-arm64

 Evaluation Mode

The Trial Version of ZPLPrinter Web API for Docker is fully functional and has no expiry date. However, while in TRIAL mode, the output rendering has the following limitations:


  • Any text that uses the Resident fonts (i.e. font names A, B, C, D, E, F, G, GS, H, 0-zero, P, Q, R, S, T U, V and TT0003M_) any chars which byte value is greater than dec 127 (hex 7F) will be replaced by an X. If you want to see how a text will look like before purchasing a license then contact our support team.
  • A TRIAL stamp will be rendered at the top of the rendering output.

Which ZPL Edition Do I Need?

The same ZPL rendering engine is available in four editions:

EditionBest forHow you use itPlatforms
ZPLPrinter Emulator SDK for .NET.NET apps (C#, VB.NET)In-process library: convert, preview and print from codeWindows, Linux, macOS (.NET Standard 2.0)
ZPLPrinter Web API for DockerAny language, servers and cloudREST API in a Docker containerLinux container (amd64 & arm64)
Virtual ZPL Printer DriverDesktop users and apps that print to a Zebra printerInstalled printer: save ZPL as PDF/PNG or print it on any other printerWindows, macOS
ZPLServerBackground integration and legacy appsLocal service: HTTP POST + raw TCP; save to disk or forward to a webhookWindows x64, Linux x64 & ARM64, macOS (Apple Silicon & Intel)

ZPLPrinter Web API FAQ

How do I convert ZPL to PDF with a REST API?
Run the container with docker run -p 8080:8080 neodynamic/zplprinterwebapi:7.0.1, then POST a JSON body like {"zplCommands":"^XA...^XZ"} to http://localhost:8080/ZPLPrinter with the header Accept: application/pdf. The response is the PDF, with one page per label.
Is it a self-hosted alternative to online ZPL viewer APIs?
Yes. ZPLPrinter Web API runs as a Docker container on your own servers or cloud account, so labels with customer or shipping data never leave your infrastructure and there is no dependency on an external web service.
Which programming languages can I use?
Any language that can send an HTTP POST with JSON: Python, Node.js, JavaScript, Java, PHP, C#, Ruby, Perl, Go or curl. There is no SDK to install.
Which output formats are supported?
PNG, JPG, PDF, TIFF and PCX, plus printer formats: Zebra GRF ASCII hex, Zebra EPL binary graphic, Honeywell-Intermec FingerPrint, EPSON ESC/POS NV and HP PCL. The format is chosen with the Accept header.
How are multiple labels returned?
PDF and TIFF return all labels in one multipage file. For PNG, JPG, PCX and the printer formats, use the +json Accept variant to get a JSON array of Base64 data URIs, or the +zip variant to get a ZIP with one file per label. The plain variant returns only the first label.
Does it run on ARM64?
Yes. Images are published for amd64 (neodynamic/zplprinterwebapi:7.0.1) and arm64 (neodynamic/zplprinterwebapi:7.0.1-arm64), so it runs on ARM servers, AWS Graviton and Raspberry Pi class devices.
Which DPI values are supported?
152 (6 dpmm), 203 (8 dpmm), 300 (12 dpmm) and 600 (24 dpmm). The dpi value must match the resolution the ZPL was designed for, otherwise the label will look scaled.
Can I convert ZPL for printers that do not support ZPL?
Yes. Request EPL, FingerPrint, ESC/POS NV or HP PCL output and set enablePrinting to true so the output is formatted for printing, then send the returned bytes to the printer.
What are the limitations of the evaluation version?
The trial is fully functional and does not expire, but it adds a TRIAL stamp to the output and replaces characters above byte value 127 with an X when resident fonts are used. See Evaluation Mode.

 Latest Release: v7.0.1 2026-11-03

  • Fixed! Font scaling.
  • Fixed! Text elements size and position when using custom fonts.

Full change log (all versions since v1.0) →