EPLPrinter Web API for Docker

REST API to Convert, Preview & Render EPL to PNG, JPG & PDF!

  Download   Buy

Key Features

  Convert raw EPL to PNG, JPG, PCX, GRF & PDF
  Preview EPL commands without wasting real labels!
  High Quality & Accuracy EPL Rendering
  EPL Parsing from Raw & Base64 Strings
  Full Barcodes Support

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

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

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

EPL Virtual Printer EPL Viewer EPL Parser EPL Converter EPL Emulator EPL2PNG EPL2JPG EPL2PCX EPL2GRF EPL2PDF EPL2Image EPL2EPL EPL2FingerPrint EPL2ESCPOS EPL Docker EPL Web API

Postman Screenshots

EPL Commands Sample 1
EPL Commands Sample 2
EPL Commands Sample 3

Features at a Glance

 Convert EPL to Images & Docs

Use EPLPrinter Web API for Docker to easily convert EPL commands to PNG, JPG, PDF, PCX, Zebra GRF ASCII hex, Zebra EPL Binary Graphic, Honeywell-Intermec FingerPrint Binary Graphic & EPSON ESC/POS NV Binary Graphic formats by writing simple C# or VB.NET code.

 Preview EPL Commands

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

 High Accuracy EPL Render

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

 EPL Parsing & Processing

EPLPrinter Web API for Docker can parse EPL commands from a .NET string, .NET Stream or physical file. It can detect UTF-8 encoding automatically. Most of the EPL Formatting and Control Commands are supported.

 Barcode Symbologies Support

EPLPrinter 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

EPLPrinter Web API for Docker can be configured to convert EPL 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 EPL Output Rotation

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

 Custom Background Image

EPLPrinter Web API for Docker allows you to render EPL commands on a specified Background Image (in PNG or JPG formats) which can be set from a system file path, URL, Base64 string or a binary buffer (Byte Array).

Overview

Designed by following some of the REST principles, EPLPrinter Web API for Docker responds to a simple HTTP POST by specifying the EPL 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 EPLPrinter Web API for Docker

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

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

    docker pull neodynamic/eplprinterwebapi:1.0.3
  • To run the Docker image, please type the following from a Terminal:

    docker run -it --rm -p 8080:80 neodynamic/eplprinterwebapi:1.0.3

How To Use It - Basic Sample

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


                    
curl -X POST "http://localhost:8080/EPLPrinter" \
     -H  "Accept: image/png" \
     -H  "Content-Type: application/json" \
     -d "{\"eplCommands\":\"N\r\nq609\r\nQ203,26\r\nB26,26,0,UA0,2,2,152,B,\"603679025109\"\r\nA253,26,0,3,1,1,N,\"SKU 6205518 MFG 6354\"\r\nA253,56,0,3,1,1,N,\"2XIST TROPICAL BEACH\"\r\nA253,86,0,3,1,1,N,\"STRIPE SQUARE CUT TRUNK\"\r\nA253,116,0,3,1,1,N,\"BRICK\"\r\nA253,146,0,3,1,1,N,\"X-LARGE\"\r\nP1\"}" \
     --output label.png
                        
                

                    
$data = array(
  'eplCommands' => 'N\r\nq609\r\nQ203,26\r\nB26,26,0,UA0,2,2,152,B,\"603679025109\"\r\nA253,26,0,3,1,1,N,\"SKU 6205518 MFG 6354\"\r\nA253,56,0,3,1,1,N,\"2XIST TROPICAL BEACH\"\r\nA253,86,0,3,1,1,N,\"STRIPE SQUARE CUT TRUNK\"\r\nA253,116,0,3,1,1,N,\"BRICK\"\r\nA253,146,0,3,1,1,N,\"X-LARGE\"\r\nP1'
);

$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/EPLPrinter';
$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/EPLPrinter")

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

data = {eplCommands: 'N\r\nq609\r\nQ203,26\r\nB26,26,0,UA0,2,2,152,B,\"603679025109\"\r\nA253,26,0,3,1,1,N,\"SKU 6205518 MFG 6354\"\r\nA253,56,0,3,1,1,N,\"2XIST TROPICAL BEACH\"\r\nA253,86,0,3,1,1,N,\"STRIPE SQUARE CUT TRUNK\"\r\nA253,116,0,3,1,1,N,\"BRICK\"\r\nA253,146,0,3,1,1,N,\"X-LARGE\"\r\nP1'}

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/EPLPrinter"

jsondata = json.dumps( {"eplCommands": "N\r\nq609\r\nQ203,26\r\nB26,26,0,UA0,2,2,152,B,\"603679025109\"\r\nA253,26,0,3,1,1,N,\"SKU 6205518 MFG 6354\"\r\nA253,56,0,3,1,1,N,\"2XIST TROPICAL BEACH\"\r\nA253,86,0,3,1,1,N,\"STRIPE SQUARE CUT TRUNK\"\r\nA253,116,0,3,1,1,N,\"BRICK\"\r\nA253,146,0,3,1,1,N,\"X-LARGE\"\r\nP1"} )

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/EPLPrinter";
my $req = HTTP::Request->new(POST => $server_endpoint);
$req->header('content-type' => 'application/json');
$req->header('accept' => 'image/png');

my $post_data = '{ "eplCommands" : "' + 'N\r\nq609\r\nQ203,26\r\nB26,26,0,UA0,2,2,152,B,\"603679025109\"\r\nA253,26,0,3,1,1,N,\"SKU 6205518 MFG 6354\"\r\nA253,56,0,3,1,1,N,\"2XIST TROPICAL BEACH\"\r\nA253,86,0,3,1,1,N,\"STRIPE SQUARE CUT TRUNK\"\r\nA253,116,0,3,1,1,N,\"BRICK\"\r\nA253,146,0,3,1,1,N,\"X-LARGE\"\r\nP1' + '" }';

$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/EPLPrinter");
 
String json = "{\"eplCommands\" : \"" + "N\r\nq609\r\nQ203,26\r\nB26,26,0,UA0,2,2,152,B,\"603679025109\"\r\nA253,26,0,3,1,1,N,\"SKU 6205518 MFG 6354\"\r\nA253,56,0,3,1,1,N,\"2XIST TROPICAL BEACH\"\r\nA253,86,0,3,1,1,N,\"STRIPE SQUARE CUT TRUNK\"\r\nA253,116,0,3,1,1,N,\"BRICK\"\r\nA253,146,0,3,1,1,N,\"X-LARGE\"\r\nP1" + "\"}";
StringEntity entity = new StringEntity(json);
httpPost.setEntity(entity);
httpPost.setHeader("Accept", "image/png");
httpPost.setHeader("Content-type", "application/json");
 
CloseableHttpResponse response = client.execute(httpPost);
HttpEntity entity = response.getEntity();
if (entity != null) {
    try (FileOutputStream outstream = new FileOutputStream(new File("label.png"))) {
        entity.writeTo(outstream);
    }
}
client.close();     
                        
                

                    
string DATA = "{\"eplCommands\" : \"" + "N\r\nq609\r\nQ203,26\r\nB26,26,0,UA0,2,2,152,B,\"603679025109\"\r\nA253,26,0,3,1,1,N,\"SKU 6205518 MFG 6354\"\r\nA253,56,0,3,1,1,N,\"2XIST TROPICAL BEACH\"\r\nA253,86,0,3,1,1,N,\"STRIPE SQUARE CUT TRUNK\"\r\nA253,116,0,3,1,1,N,\"BRICK\"\r\nA253,146,0,3,1,1,N,\"X-LARGE\"\r\nP1" + "\"}";

var request = (HttpWebRequest)WebRequest.Create("http://localhost:8080/EPLPrinter");
request.Method = "POST";
request.ContentType = "application/json";
request.ContentLength = DATA.Length;
request.Accept = "image/png";

using (var requestWriter = new StreamWriter(request.GetRequestStream(), System.Text.Encoding.ASCII)){
    requestWriter.Write(DATA);
}

var webResponse = request.GetResponse();
using (var stream = webResponse.GetResponseStream())
using (var fileStream = File.OpenWrite("label.png"))
{
    var bytes = new byte[4096];
    var read=0;
    do
    {
        if (stream == null) {continue;}
        read = stream.Read(bytes, 0, bytes.Length);
        fileStream.Write(bytes, 0, read);
    } while (read != 0);
}

                        
                

                    
var data = JSON.stringify({
    "eplCommands": "N\r\nq609\r\nQ203,26\r\nB26,26,0,UA0,2,2,152,B,\"603679025109\"\r\nA253,26,0,3,1,1,N,\"SKU 6205518 MFG 6354\"\r\nA253,56,0,3,1,1,N,\"2XIST TROPICAL BEACH\"\r\nA253,86,0,3,1,1,N,\"STRIPE SQUARE CUT TRUNK\"\r\nA253,116,0,3,1,1,N,\"BRICK\"\r\nA253,146,0,3,1,1,N,\"X-LARGE\"\r\nP1"
});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
    if (this.readyState === 4) {
    console.log(this.responseText);
    }
});

xhr.open("POST", "http://localhost:8080/EPLPrinter");
xhr.setRequestHeader("content-type", "application/json");
xhr.setRequestHeader("accept", "image/png");

xhr.send(data);
                        
                

                    
var request = require('request');
 
var headers = {
    'Accept': 'image/png',
    'Content-Type': 'application/json'
}
 
var options = {
    url: 'http://localhost:8080/EPLPrinter',
    method: 'POST',
    headers: headers,
    json: {"eplCommands": "N\r\nq609\r\nQ203,26\r\nB26,26,0,UA0,2,2,152,B,\"603679025109\"\r\nA253,26,0,3,1,1,N,\"SKU 6205518 MFG 6354\"\r\nA253,56,0,3,1,1,N,\"2XIST TROPICAL BEACH\"\r\nA253,86,0,3,1,1,N,\"STRIPE SQUARE CUT TRUNK\"\r\nA253,116,0,3,1,1,N,\"BRICK\"\r\nA253,146,0,3,1,1,N,\"X-LARGE\"\r\nP1"}
}
 
request(options, function (error, response, body) {
    if (!error && response.statusCode == 200) {
        console.log(body);
    }
})
                        
                

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/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.zpl+json or application/vnd.zpl+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.
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/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>", ... ]}
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/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.

Web API Doc


EPL Commands Support

EPLPrinter Web API rendering engine supports most of the EPL 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 EPLPrinter Emulator SDK leverages on its own barcode encoder. However, this does not mean that the rendered barcodes will not be readable at all.
Status EPL Command Notes
A - ASCII TextLatin resident fonts 1, 2, 3, 4, 5, 6, and 7
B - Linear Bar CodeCode 39, Code 93, Code 128, UCC Serial Shipping Container, Codabar, EAN 8-13, German Post Code, Interleaved 2 of 5, Postnet, Planet, UCC/EAN 128, UPC A-E, Plessey, MSI
b - 2D Bar CodeAztec, Data Matrix, MaxiCode, PDF417, and QR Code
GG - Print Graphics
GK - Delete Graphics
GM - Store Graphics
GW - Direct Graphic Write
LE - Line Draw Exclusive OR
LO - Line Draw Black
LS - Line Draw Diagonal
LW - Line Draw White
N - Clear Image Buffer
P - Print
q - Set Label Width
Q - Set Form Length
R - Set Reference Point
X - Box Draw
Z - Print Direction
^@ - Reset Printer

Licensing

On-Premise - Full Deployment Control

EPLPrinter 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 EPLPrinter 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 folows:

docker run -it --rm -e "LICENSE_OWNER=YOUR-COMPANY-NAME" -e "LICENSE_KEY=YOUR_KEY" -p 8080:80 neodynamic/eplprinterwebapi:1.0.3

 Evaluation Mode

The Trial Version of EPLPrinter 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 1, 2, 3, 4, 5, 6 and 7) 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.

 Change Log

  • 1.0.3 2022-06-24
    • Fixed! Maxicode encoding when no LPM is specified.
    • Fixed! Maxicode rendering location.

  • 1.0.2 2022-06-11
    • Fixed! Commands parsing generate overlapped labels rendering.

  • 1.0.1 2022-05-04
    • Fixed! Graphic commands parsing errors.

  • 1.0 2022-03-16
    • New! Initial release.