ThermalLabel Web API for Docker

Self-hosted REST API that turns JSON/XML label templates + data into ZPL, EPL, ESC/POS, PCL, PDF & images


Key Features

  On-premise REST API running Linux Docker container
  Zebra ZPL® & EPL®, EPSON ESC/POS®, Honeywell Fingerprint & Direct Protocol, HP PCL
  Linear & 2D Barcodes, Unicode Text, Images, RFID
  Export to PDF, PNG, JPG, SVG, PCX & HTML
  Data Merging, Counters, Masking & XML/JSON Templates
  amd64 & arm64 • Optional visual Web Editor

  Download   Buy

Advanced Barcode Label Generator for Docker

ThermalLabel Web API can be used for designing from simple to complex labels layout supporting Texts, Barcodes, Graphics and Images, RFID Tags, and Shapes like circles, ellipses, rectangles, and lines. It provides an unified object model which will allow you to create one label design and export/convert it to either raw Zebra, EPSON & Honeywell-Intermec, HP PCL printer commands as well as to image or document formats like JPEG/JPG, PNG, PCX, SVG, HTML, and PDF!

It works with any programming language: send an HTTP POST with the label template (JSON, XML or Base64) and optional data, and choose the output format with the Accept header. It runs as a Linux Docker container (amd64 & arm64) on your own servers, Kubernetes cluster or cloud account, so label and customer data never leave your infrastructure. It uses the same label engine and template format as the ThermalLabel SDK for .NET.


Quick Start: JSON Label Template to ZPL & PDF in 3 Steps

1. Run the container (use the -arm64 tag on ARM hosts):

docker run -it --rm -p 8080:8080 neodynamic/thermallabelwebapi:7.0.1

2. POST a label template to /ThermalLabel/Convert and choose the output with the Accept header. This one returns Zebra ZPL for a 203 dpi printer, ready to send to port 9100:

curl -X POST "http://localhost:8080/ThermalLabel/Convert" \
     -H "Content-Type: application/json" \
     -H "Accept: application/vnd.zpl" \
     -d '{"thermalLabel":"{\"unitType\":\"Inch\",\"width\":4,\"height\":3,\"gapLength\":0.2,\"items\":[{\"typeName\":\"TextItem\",\"x\":0.2,\"y\":0.2,\"width\":2.5,\"height\":0.5,\"text\":\"Thermal Label Test\"},{\"typeName\":\"BarcodeItem\",\"x\":0.2,\"y\":1,\"width\":2,\"height\":1,\"symbology\":\"Code128\",\"code\":\"ABC 12345\",\"barHeight\":0.75,\"barWidth\":0.0104}]}","dpi":203}' \
     --output label.zpl

# send it to a Zebra network printer
nc 192.168.1.50 9100 < label.zpl

3. Merge data: add a dataSource (JSON array or XML) and bind items with dataField. One label is generated per row; application/pdf returns them as a multipage PDF:

curl -X POST "http://localhost:8080/ThermalLabel/Convert" \
     -H "Content-Type: application/json" \
     -H "Accept: application/pdf" \
     -d '{"thermalLabel":"{\"unitType\":\"Inch\",\"width\":4,\"height\":3,\"gapLength\":0.2,\"items\":[{\"typeName\":\"TextItem\",\"x\":0.2,\"y\":0.2,\"width\":3.6,\"height\":0.5,\"text\":\"Product Name\",\"dataField\":\"ProductName\"},{\"typeName\":\"BarcodeItem\",\"x\":0.2,\"y\":1,\"width\":3.6,\"height\":1.5,\"symbology\":\"Code128\",\"code\":\"ABC01\",\"dataField\":\"ProductId\",\"barHeight\":0.75,\"barWidth\":0.0104}]}","dataSource":"[{\"ProductName\":\"Olive Oil\",\"ProductId\":\"ABC01\"},{\"ProductName\":\"Chocolate\",\"ProductId\":\"ABC02\"}]"}' \
     --output labels.pdf

The thermalLabel field is the template as a string (JSON, XML or Base64). You can write it by hand, export it from the ThermalLabel SDK with GetJsonTemplate(), let users design it with the Web Editor, or start from the default objects returned by GET /ThermalLabel and GET /Items/BarcodeItem, /Items/TextItem, etc. See samples in other languages and the API reference.

Postman Screenshots

QR Code, Code 128, Label
QR Code Color Label
Avery Multicolumn Barcode Labels
Full Color Label

Features at a Glance

 Zebra, EPSON & Honeywell-Intermec Compatible

ThermalLabel Web API converts label designs or templates to Zebra-compatible Thermal Printers supporting ZPL® or ZPL II® (Zebra Programming Language) or EPL (Eltron Programming Language), EPSON printers supporting ESC/POS®, HP printers supporting PCL® as well as Honeywell-Intermec printers supporting Fingerprint® / Direct Protocol commands.

   Full Color Label

In addition to create monochrome labels for thermal printers, ThermalLabel Web API also supports full color label design and generation and can be converted to JPEG/JPG, PNG, PCX, SVG, HTML, and PDF formats.

fx 100+ Expressions/Formulas

Expressions/Formulas can include a combination of variables, constants, operators, functions, and references to label Items as well as to data fields in a data merging/binding scenario.
Expressions are set to any Item in the label to dynamically set the Item's content based on the expressions result.
ThermalLabel Web API ships with 100+ built-in well-known functions.


 Data Merging/Binding Support

ThermalLabel Web API was designed considering Data Merging/Binding scenarios which mean you can merge/bind text and barcode items to XML & JSON Array data sources.

 Counters - Print Range

Counters allow you to index data items by a selected increment or decrement value, making the data items increase or decrease by a specified value each time a label is printed. This feature allows scenarios like generating 10 barcode labels for values ranging from "ABC01" to "ABC10".

 Data Masking & Formatting

Data Masking allows you to serialize data items by specifying a Mask string as well as an increment string. It's useful for batch printing scenarios when serialized items are involved. This feature allows scenarios like generating a barcode label for a serialized product from "MDL-001/X" to "MDL-010/X" (i.e. the sequence will be MDL-001/X, MDL-002/X, MDL-003/X, ..., MDL-010/X).

Text, Pictures, Shapes & RFID

Text items supporting multi-line, content alignment, sizing, Unicode, RTL (Hebrew, Arabic, etc.), HTML Spans with styles, Custom and installed TTF files, White Text On Black, rotation, horizontal alignment, counters, and text masking.

Graphic, Image & Picture items supporting image formats like JPG/JPEG, and PNG; monochrome conversion features like Threshold and Floyd-Steinberg algorithms and reversing; sources image like files, base64 as well as binary content.

Shape items supporting Tables/Grids, lines (horizontal, vertical, and diagonals), rectangles with rounded corners, circles and ellipses.

Repeater items supporting fixed count and data bound items repetition.

RFID items supporting ASCII, HEX as well as EPC Data Structures. (NOTE: Only available for ZPL & Fingerprint / Direct Protocol printers)

First-class Barcode Support Out-of-the-box

ThermalLabel Web API supports most popular Linear (1D), Postal, Component Composite & 2D Barcode Symbologies including Code 39, Code 128, GS1-128, GS1 DataBar (RSS-14), EAN 13 & UPC, Postal (USPS, British Royal Mail, Australia Post, DHL, FedEx), Data Matrix (including GS1 & DMRE versions), QR Code (including GS1 version), PDF 417, Aztec Code, UPS MaxiCode, Chinese Han Xin Code, IFA PPN, all EAN/UPC Composite Barcodes (CC-A, CC-B & CC-C), DotCode and many more barcode standards

GS1-AIM-ISO/IEC Compliance

Our barcode algorithms were written by following the official specifications of each barcode symbology. Our barcode engine within ThermalLabel Web API provides you with exclusive features like auto-checksum, data validation, Bar Width Adjustment (BWA) for linear & 2D symbols, auto-encoding methods for shortest barcode symbol generation.

XML/JSON-based Label Templates

ThermalLabel Web API handles label designs in a plain & simple XML/JSON-based format. These string representation of the thermal label in XML or JSON formats allow you to save or store them in any kind of data source be it Database, file on disk, memory stream, etc. The XML/JSON Label Template can be generated in your preferred programming language or visually through the ThermalLabel Web Editor Add-on.


ThermalLabel Web Editor Add-on

Design labels from Windows, Linux, Mac & Android!

ThermalLabel Web Editor Add-on is a first-class barcode label designer component for any website which empowers your WebApps by providing an end-user visual label editor!

With the ThermalLabel Web Editor component, you can allow your end-users to create, load, edit and save ThermalLabel objects in the form of XML/JSON template files definition from Windows, Linux, Mac & Android Clients with latest browsers!

How it works with Docker: the container exposes the /ThermalLabelEditor endpoint, which is the server-side backend the editor needs (item rendering, preview, PDF/image export and printer commands), so no .NET server is required. Register the editor license with the EDITOR_LICENSE_OWNER and EDITOR_LICENSE_KEY environment variables and point the editor to the container:
var TLE = Neodynamic.Web.Editor.ThermalLabelEditor;
TLE.websiteRootAbsoluteUrl = "http://localhost:8080";
TLE.thermalLabelWebEditorControllerName = "ThermalLabelEditor";

var editor = new TLE("#editorHost");
editor.enableEditor();
 Download ThermalLabel Web Editor sample project...

IMPORTANT: This label editor is optional and sold separately. You can use the Web API without needing the Web label editor. Learn more about the Web Editor.


Download and run ThermalLabel Web API for Docker

ThermalLabel 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/thermallabelwebapi:7.0.1
    ARM
    docker pull neodynamic/thermallabelwebapi: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/thermallabelwebapi:7.0.1
    ARM
    docker run -it --rm -p 8080:8080 neodynamic/thermallabelwebapi: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 ThermalLabel 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. Note that docker run options such as -e and -u must go before the image name.

  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 12345:12345 -e ASPNETCORE_HTTP_PORTS=12345 neodynamic/thermallabelwebapi:7.0.1
    ARM
    docker run -it --rm -p 12345:12345 -e ASPNETCORE_HTTP_PORTS=12345 neodynamic/thermallabelwebapi:7.0.1-arm64
  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 80:80 -u root -e ASPNETCORE_HTTP_PORTS=80 neodynamic/thermallabelwebapi:7.0.1
    ARM
    docker run -it --rm -p 80:80 -u root -e ASPNETCORE_HTTP_PORTS=80 neodynamic/thermallabelwebapi:7.0.1-arm64

How To Use It: Samples in Python, Node.js, Java, PHP, C# & more

The following code sends a JSON label template plus a JSON data source to POST /ThermalLabel/Convert and saves the result as a multipage PDF (one page per data row). Change the Accept header to get ZPL, EPL, ESC/POS, Fingerprint, Direct Protocol, PCL, PNG, SVG and more. For all the parameters see the API reference.


                    
# label.json holds the template; jq embeds it as a string
jq -n --rawfile tpl label.json --arg data '[{"ProductName":"Olive Oil","ProductId":"ABC01"},{"ProductName":"Chocolate","ProductId":"ABC02"}]' \
   '{thermalLabel: $tpl, dataSource: $data}' |
curl -X POST "http://localhost:8080/ThermalLabel/Convert" \
     -H "Content-Type: application/json" \
     -H "Accept: application/pdf" \
     --data-binary @- \
     --output labels.pdf
                        
                

                    
$template = <<<'JSON'
{
  "unitType": "Inch", "width": 4, "height": 3, "gapLength": 0.2,
  "items": [
    { "typeName": "TextItem", "x": 0.2, "y": 0.2, "width": 3.6, "height": 0.5,
      "text": "Product Name", "dataField": "ProductName" },
    { "typeName": "BarcodeItem", "x": 0.2, "y": 1, "width": 3.6, "height": 1.5,
      "symbology": "Code128", "code": "ABC01", "dataField": "ProductId",
      "barHeight": 0.75, "barWidth": 0.0104 }
  ]
}
JSON;
$data = '[{"ProductName":"Olive Oil","ProductId":"ABC01"},{"ProductName":"Chocolate","ProductId":"ABC02"}]';

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

$response = file_get_contents('http://localhost:8080/ThermalLabel/Convert', false, stream_context_create($options));
file_put_contents('labels.pdf', $response);
                        
                

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

template = <<~'JSON'
{
  "unitType": "Inch", "width": 4, "height": 3, "gapLength": 0.2,
  "items": [
    { "typeName": "TextItem", "x": 0.2, "y": 0.2, "width": 3.6, "height": 0.5,
      "text": "Product Name", "dataField": "ProductName" },
    { "typeName": "BarcodeItem", "x": 0.2, "y": 1, "width": 3.6, "height": 1.5,
      "symbology": "Code128", "code": "ABC01", "dataField": "ProductId",
      "barHeight": 0.75, "barWidth": 0.0104 }
  ]
}
JSON
data = '[{"ProductName":"Olive Oil","ProductId":"ABC01"},{"ProductName":"Chocolate","ProductId":"ABC02"}]'

uri = URI.parse("http://localhost:8080/ThermalLabel/Convert")
header = {'Accept' => 'application/pdf', 'Content-Type' => 'application/json'}

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

response = http.request(request)
File.binwrite('labels.pdf', response.body)
                        
                

                    
import requests

template = """{
  "unitType": "Inch", "width": 4, "height": 3, "gapLength": 0.2,
  "items": [
    { "typeName": "TextItem", "x": 0.2, "y": 0.2, "width": 3.6, "height": 0.5,
      "text": "Product Name", "dataField": "ProductName" },
    { "typeName": "BarcodeItem", "x": 0.2, "y": 1, "width": 3.6, "height": 1.5,
      "symbology": "Code128", "code": "ABC01", "dataField": "ProductId",
      "barHeight": 0.75, "barWidth": 0.0104 }
  ]
}"""
data = '[{"ProductName":"Olive Oil","ProductId":"ABC01"},{"ProductName":"Chocolate","ProductId":"ABC02"}]'

response = requests.post(
    "http://localhost:8080/ThermalLabel/Convert",
    json={"thermalLabel": template, "dataSource": data},
    headers={"Accept": "application/pdf"}
)
response.raise_for_status()
with open("labels.pdf", "wb") as f:
    f.write(response.content)
                        
                

                    
use LWP::UserAgent;
use JSON::PP;

my $template = <<'JSON';
{
  "unitType": "Inch", "width": 4, "height": 3, "gapLength": 0.2,
  "items": [
    { "typeName": "TextItem", "x": 0.2, "y": 0.2, "width": 3.6, "height": 0.5,
      "text": "Product Name", "dataField": "ProductName" },
    { "typeName": "BarcodeItem", "x": 0.2, "y": 1, "width": 3.6, "height": 1.5,
      "symbology": "Code128", "code": "ABC01", "dataField": "ProductId",
      "barHeight": 0.75, "barWidth": 0.0104 }
  ]
}
JSON
my $data = '[{"ProductName":"Olive Oil","ProductId":"ABC01"},{"ProductName":"Chocolate","ProductId":"ABC02"}]';

my $ua  = LWP::UserAgent->new;
my $req = HTTP::Request->new(POST => "http://localhost:8080/ThermalLabel/Convert");
$req->header('Content-Type' => 'application/json');
$req->header('Accept' => 'application/pdf');
$req->content(encode_json({ thermalLabel => $template, dataSource => $data }));

my $resp = $ua->request($req);
open(my $fh, '>:raw', 'labels.pdf');
print $fh $resp->content;
close($fh);
                        
                

                    
// Java 15+ (text blocks) and java.net.http, no extra dependencies
String template = """
    {
      "unitType": "Inch", "width": 4, "height": 3, "gapLength": 0.2,
      "items": [
        { "typeName": "TextItem", "x": 0.2, "y": 0.2, "width": 3.6, "height": 0.5,
          "text": "Product Name", "dataField": "ProductName" },
        { "typeName": "BarcodeItem", "x": 0.2, "y": 1, "width": 3.6, "height": 1.5,
          "symbology": "Code128", "code": "ABC01", "dataField": "ProductId",
          "barHeight": 0.75, "barWidth": 0.0104 }
      ]
    }
    """;
String data = "[{\"ProductName\":\"Olive Oil\",\"ProductId\":\"ABC01\"},{\"ProductName\":\"Chocolate\",\"ProductId\":\"ABC02\"}]";

String body = "{\"thermalLabel\":\"" + escape(template) + "\",\"dataSource\":\"" + escape(data) + "\"}";

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder(URI.create("http://localhost:8080/ThermalLabel/Convert"))
    .header("Content-Type", "application/json")
    .header("Accept", "application/pdf")
    .POST(HttpRequest.BodyPublishers.ofString(body))
    .build();
client.send(request, HttpResponse.BodyHandlers.ofFile(Path.of("labels.pdf")));

// minimal JSON string escaping (use Jackson or Gson in real code)
static String escape(String s) {
    return s.replace("\\", "\\\\").replace("\"", "\\\"").replace("\n", "\\n");
}
                        
                

                    
// .NET 7+ (raw string literals). For .NET apps you can also use the ThermalLabel SDK directly.
using var http = new HttpClient();

string template = """
    {
      "unitType": "Inch", "width": 4, "height": 3, "gapLength": 0.2,
      "items": [
        { "typeName": "TextItem", "x": 0.2, "y": 0.2, "width": 3.6, "height": 0.5,
          "text": "Product Name", "dataField": "ProductName" },
        { "typeName": "BarcodeItem", "x": 0.2, "y": 1, "width": 3.6, "height": 1.5,
          "symbology": "Code128", "code": "ABC01", "dataField": "ProductId",
          "barHeight": 0.75, "barWidth": 0.0104 }
      ]
    }
    """;
string data = """[{"ProductName":"Olive Oil","ProductId":"ABC01"},{"ProductName":"Chocolate","ProductId":"ABC02"}]""";

string json = JsonSerializer.Serialize(new { thermalLabel = template, dataSource = data });
var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost:8080/ThermalLabel/Convert")
{
    Content = new StringContent(json, Encoding.UTF8, "application/json")
};
request.Headers.Accept.ParseAdd("application/pdf");

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

                    
// Browser (inside a <script type="module">): preview the first label as PNG
const template = {
  unitType: "Inch", width: 4, height: 3, gapLength: 0.2,
  items: [
    { typeName: "TextItem", x: 0.2, y: 0.2, width: 3.6, height: 0.5,
      text: "Product Name", dataField: "ProductName" },
    { typeName: "BarcodeItem", x: 0.2, y: 1, width: 3.6, height: 1.5,
      symbology: "Code128", code: "ABC01", dataField: "ProductId",
      barHeight: 0.75, barWidth: 0.0104 }
  ]
};
const data = [
  { ProductName: "Olive Oil", ProductId: "ABC01" },
  { ProductName: "Chocolate", ProductId: "ABC02" }
];

const response = await fetch("http://localhost:8080/ThermalLabel/Convert", {
  method: "POST",
  headers: { "Content-Type": "application/json", "Accept": "image/png" },
  body: JSON.stringify({ thermalLabel: JSON.stringify(template), dataSource: JSON.stringify(data) })
});
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 template = {
  unitType: "Inch", width: 4, height: 3, gapLength: 0.2,
  items: [
    { typeName: "TextItem", x: 0.2, y: 0.2, width: 3.6, height: 0.5,
      text: "Product Name", dataField: "ProductName" },
    { typeName: "BarcodeItem", x: 0.2, y: 1, width: 3.6, height: 1.5,
      symbology: "Code128", code: "ABC01", dataField: "ProductId",
      barHeight: 0.75, barWidth: 0.0104 }
  ]
};
const data = [
  { ProductName: "Olive Oil", ProductId: "ABC01" },
  { ProductName: "Chocolate", ProductId: "ABC02" }
];

const response = await fetch("http://localhost:8080/ThermalLabel/Convert", {
  method: "POST",
  headers: { "Content-Type": "application/json", "Accept": "application/pdf" },
  body: JSON.stringify({ thermalLabel: JSON.stringify(template), dataSource: JSON.stringify(data) })
});
fs.writeFileSync("labels.pdf", 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 params 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 params generate more than one label, then you should specify image/jpeg+json or image/jpeg+zip values instead.
image/svg+xml Returns all the rendered labels in SVG format.
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 params generate more than one label, then you should specify image/vnd.zbrush.pcx+json or image/vnd.zbrush.pcx+zip values instead.
text/html Returns all the rendered labels in HTML format.
application/vnd.zpl Returns all the rendered labels in Zebra ZPL format.
application/vnd.epl Returns all the rendered labels in Zebra EPL format.
application/vnd.fingerprint Returns all the rendered labels in Honeywell-Intermec Fingerprint format.
application/vnd.dp Returns all the rendered labels in Honeywell-Intermec Direct Protocol format.
application/vnd.escpos Returns all the rendered labels in EPSON ESC/POS format.
application/vnd.hp-pcl Returns all the rendered labels in HP PCL format.
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>", ... ]}
image/svg+xml+json Returns all the rendered labels as a JSON Array containing each label in Base64 SVG Data URI scheme. The returned JSON Object will have this structure: {labels:["data:image/svg+xml;base64,<BASE64-STRING>", "data:image/svg+xml;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>", ... ]}
text/html+json Returns all the rendered labels as a JSON Array containing each label in Base64 HTML Data URI scheme. The returned JSON Object will have this structure: {labels:["data:text/html;base64,<BASE64-STRING>", "data:text/html;base64,<BASE64-STRING>", ... ]}
application/vnd.zpl+json Returns all the rendered labels as a JSON Array containing each label in Base64 ZPL Data URI scheme. {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 EPL Data URI scheme. {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 Fingerprint Data URI scheme. {labels:["data:application/vnd.fingerprint;base64,<BASE64-STRING>", "data:application/vnd.fingerprint;base64,<BASE64-STRING>", ... ]}
application/vnd.dp+json Returns all the rendered labels as a JSON Array containing each label in Base64 Direct Protocol Data URI scheme. {labels:["data:application/vnd.dp;base64,<BASE64-STRING>", "data:application/vnd.dp;base64,<BASE64-STRING>", ... ]}
application/vnd.escpos+json Returns all the rendered labels as a JSON Array containing each label in Base64 ESC/POS Data URI scheme. {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 PCL Data URI scheme. {labels:["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 [DataTime-Ticks].png
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 [DataTime-Ticks].jpg
image/svg+xml+zip Returns all the rendered labels as a ZIP file containing a single SVG. The SVG file will contain as many pages as rendered labels. [DataTime-Ticks].svg
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. [DataTime-Ticks].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 [DataTime-Ticks].pcx
text/html+zip Returns all the rendered labels as a ZIP file containing a single HTML doc. The HTML file will contain as many pages as rendered labels. [DataTime-Ticks].html
application/vnd.zpl+zip Returns all the rendered labels as a ZIP file containing a single ZPL file. The ZPL file will contain as many pages as rendered labels. [DataTime-Ticks].zpl
application/vnd.epl+zip Returns all the rendered labels as a ZIP file containing a single EPL file. The EPL file will contain as many pages as rendered labels. [DataTime-Ticks].epl
application/vnd.fingerprint+zip Returns all the rendered labels as a ZIP file containing a single Fingerprint file. The Fingerprint file will contain as many pages as rendered labels. [DataTime-Ticks].fingerprint
application/vnd.dp+zip Returns all the rendered labels as a ZIP file containing a single Direct Protocol file. The DP file will contain as many pages as rendered labels. [DataTime-Ticks].dp
application/vnd.escpos+zip Returns all the rendered labels as a ZIP file containing a single ESC/POS file. The ESC/POS file will contain as many pages as rendered labels. [DataTime-Ticks].escpos
application/vnd.hp-pcl+zip Returns all the rendered labels as a ZIP file containing a single PCL file. [DataTime-Ticks].pcl

Web API Reference

Endpoints

MethodPathDescription
GET/ThermalLabelReturns a ThermalLabel.
GET/ThermalLabel/ThermalLabelPageReturns a ThermalLabelPage.
GET/ThermalLabel/ThermalLabelFontReturns a ThermalLabelFont.
POST/ThermalLabel/ConvertConverts a ThermalLabel template to Printer Commands, Images, and Documents formats.
POST/ThermalLabel/ThumbnailCreates a thumbnail image of a ThermalLabel document.
GET/ThermalLabelEditorProcess the ThermalLabel Editor requests.
POST/ThermalLabelEditorProcess the ThermalLabel Editor requests.
GET/Items/{type}Returns a default JSON object for an item type, to use as a starting point in your templates: BarcodeItem, TextItem, ImageItem, RectangleShapeItem, CircleShapeItem, EllipseShapeItem, LineShapeItem, LiteralItem, RFIDTagItem, RepeaterItem, TableShapeItem, TableColumn, TableRow.

POST /ThermalLabel/Convert – request body (ConvertData)

PropertyTypeDefaultDescription
thermalLabelstringThe ThermalLabel template in XML, JSON or Base64 formats.
dataSourcestringThe data source in XML or JSON formats to merge with the specified ThermalLabel.
dpiinteger96The output image resolution.
pageOrientationenum: Portrait | Landscape90 | Portrait180 | Landscape270PortraitThe page orientation.
copiesinteger1The number of print copies.
replicatesinteger0The number of print replicates.
pdfMetadataPdfMetadataPDF document properties (see below).
scaleXnumber1The scaling factor in the X direction for Image conversion.
scaleYnumber1The scaling factor in the Y direction for Image conversion.

pdfMetadata (PdfMetadata) accepts author, creator, producer, subject, title, useVectorDrawing and rasterEncodingQuality.

POST /ThermalLabel/Thumbnail – request body (ThumbnailData)

PropertyTypeDefaultDescription
thermalLabelstringThe ThermalLabel document in XML, JSON or Base64 formats.
dataSourcestringThe data source in XML or JSON formats to merge with the specified ThermalLabel.
sizeinteger200The output image size in pixel unit.
dpiinteger96The output image resolution.
ignoreExpressionsbooleanfalseWhether any expressions found in the label should be ignored.
ignoreDataFieldsbooleanfalseWhether any data fields found in the label should be ignored.

ThermalLabel template object

The object you serialize (as JSON or XML) into the thermalLabel field. Every item in items needs a typeName (TextItem, BarcodeItem, ImageItem, RectangleShapeItem, CircleShapeItem, EllipseShapeItem, LineShapeItem, TableShapeItem, RepeaterItem, LiteralItem or RFIDTagItem). BarcodeItem.symbology supports 186 barcode types.

PropertyTypeDefaultDescription
widthnumberThe width of the thermal label. The unit of measurement is specified by UnitType property. Default value is 1
heightnumberThe height of the thermal label. The unit of measurement is specified by UnitType property. Default value is 1
unitTypeenum: Cm | Inch | Mm | DotsPerInch | Point | Pica | Mils | TwipThe Unit of Measurement for the thermal label. The Unit of Measurement affects the thermal label size as well as its items' dimensions and locations. Default value is Inch
itemsarray of objectThe list of Items composing the label.
dataFieldReplicatesstringThe DataField name from the data source that must be used for specifying the number of replicates for each data source row. Default is an empty string
gapLengthnumberThe vertical gap length between labels. The unit of measurement is specified by UnitType property. Default value is 0 (zero)
markLengthnumberThe mark length or thickness between labels. The unit of measurement is specified by UnitType property. Default value is 0 (zero)
offsetLengthnumberThe offset length or thickness between labels. The unit of measurement is specified by UnitType property. Default value is 0 (zero)
labelsPerRowintegerThe number of labels per row in the media roll. Default value is 1
labelsHorizontalGapLengthnumberThe horizontal gap length between labels when the media roll contains more than one label per row. The unit of measurement is specified by UnitType property. Default value is 0 (zero)
isContinuousbooleanWhether this ThermalLabel is on a continuous media roll i.e. labels are not separated by gaps, spaces, notches, slots, or holes. Default is false.
shapeenum: Rectangle | EllipseThe shape of this ThermalLabel. Default is Rectangle.
printSpeedstringThe media speed during printing. The value setting depends on the printer model and usually is in IPS (Inch Per Seconds). Look for it in the printer user manual.
printMirrorbooleanWhether this label is printed as a mirror image. Default is false.
cutAfterPrintingbooleanWhether this label is cut after printing. Default is false.
batchCutintegerNumber of labels after which the cut will be performed. Default is 1.
darknessnumberThe output printing darkness setting which depends on the target printer type.
expressionsarray of objectThe list of Expressions to apply on the label.
sheetLabelsWidthnumberThe width of the Sheet Labels where this thermal label is part of. The unit of measurement is specified by UnitType property. Default value is 0.
sheetLabelsHeightnumberThe height of the Sheet Labels where this thermal label is part of. The unit of measurement is specified by UnitType property. Default value is 0.
sheetLabelsCountintegerThe total number individual labels of the Sheet Labels where this thermal label is part of. Default value is 0.
sheetLabelsMarginFrameThickness
marginFrameThickness
useDefaultMediaTypebooleanWhether to use the default printer configuration for Media Type (Continuous, Web sensing, Mark sensing, etc). Default is false.
designBackgroundImagestringA non-printing background image (in PNG format) that assists you in the design of your labels through the visual editors. Image must be specified in Base64 format.
isDuplexDesignbooleanWhether this label is a duplex design. Default is false.
tagstringAn arbitrary string value that can be used to store custom information about this label. Default is an empty string.
isSheetOfLabelsbooleanWhether this label is a Sheet of labels type.
pagesarray of objectThe list of ThermalLabelPage objects representing the pages within this label.
fontsarray of objectThe list of ThermalLabelFont objects representing the embedded fonts within this label.
isDataBoundbooleanWhether any Item in the current label is data bound.
TextItem properties (57)
PropertyTypeDefaultDescription
namestringThe programmatic identifier or name assigned to the item. Default value is an empty string
xnumberThe x-coordinate of the upper-left corner of the item relative to the upper-left corner of its container. Default value is 0 (zero)
ynumberThe y-coordinate of the upper-left corner of the item relative to the upper-left corner of its container. Default value is 0 (zero)
dataFieldstringThe name of the field from the data source that contains the values to bind to this item. Default value is an empty string
dataFieldFormatStringstringThe string that specifies the display format for the value of the data field. Default value is an empty string
useCachebooleanWhether the item should be cached in the printer's memory. An item cannot be cached if it's bound to some data source field through the DataField property. Default value is false
cacheItemIdstringThe ID which will be assigned to the item in the cache. It must be a unique ID value for each item. The ID must be 1 to 8 alphanumeric [A-Z][0-9] characters long. If it's empty, then a random ID will be assigned automatically at runtime. Default value is an empty string
printAsGraphicbooleanWhether the item's output is forced to be printed as a graphic. Default is false.
visiblebooleanWhether the item is visible and printed. Default is true.
commentsstringThe comments associated to this item. Default is an empty string.
tagstringAn arbitrary string value that can be used to store custom information about this item. Default is an empty string.
lockedbooleanWhether this item cannot be inadvertently moved nor resized in the visual editor surface. Default is false.
editablebooleanWhether this item can be edited in the visual editor surface. Default is true.
resizablebooleanWhether this item can be resizable in the visual editor surface. Default is true.
expressionstringAn expression that will be evaluated when rendering this item. Default value is an empty string
isDesignTimebooleanWhether this item is in design time in the visual editor surface. Default is false.
groupNamestringThe group name which this item is part of. Default is empty.
readOnlybooleanWhether the source content of this item can be changed or not. Default is false.
typeNamestringThe Item Type name.
textstringThe text. Default value is an empty string
fontFont
foreColorenum: Black | WhiteThe foreground color of the text. Default value is Black
foreColorHexstringThe foreground color of the text in hex notation.
rotationAngleintegerThe rotation angle to apply on this item. It is measured clockwise from the x-axis. Default value is 0 (zero)
widthnumberThe width of the text item. Default value is 1
heightnumberThe height of the text item. Default value is 0.5
counterStepintegerThe step for the counter. The counter will increase (positive) or decrease (negative) by this number on every printed label. Default value is 0 (zero)
counterUseLeadingZerosbooleanWhether leading zeros are printed or suppressed when using counters. Default value is false
maskstringThe input Mask for the text. Default value is an empty string
maskIncrementstringThe mask increment. The increment is the value to be added to the text on each label to be printed. Default value is an empty string
rightToLeftbooleanWhether the text should draw right-to-left for RTL languages. Default value is false
sizingenum: None | Stretch | FontSizeScaling | ParagraphScaling | Arc | Vertical | OuterArc | ParagraphScalingAndFill | AutoSize | OverflowSplitThe text sizing. Default value is None
cornerRadiusRectangleCornerRadius
borderThicknessFrameThickness
borderColorenum: Black | WhiteThe color of the border of the rectangle container. Default value is Black
borderColorHexstringThe color of the border of the rectangle container in hex notation.
backColorenum: Black | WhiteThe background color of the text. Default value is White
backColorHexstringThe background color of the text in hex notation.
textPaddingFrameThickness
textAlignmentenum: Left | Center | Right | JustifyThe alignment of the text. Default value is Left
cultureNamestringThe Culture Name for text formatting. Default is en-US. Other sample values: de-DE, es-ES, etc. Any value supported by .NET CultureInfo class.
maxLengthintegerThe maximum number of characters allowed for this text item object. Default is 0 which means that unlimited number of characters will be allowed.
hideIfEmptybooleanWhether this text item is not displayed or printed if the value to encode is empty. Default value is false
inputMaskPatternstringThe input mask pattern to use at design time on the label editor. Default is an empty string.
inputMaskPromptCharstringThe character used to represent the absence of user input. At design time on the label editor, this character will be displayed in the TextItem for any input mask pattern position that the end user has not yet filled in. Default is an underscore (_).
strokeThicknessnumberThe text stroke thickness. Default value is 0.
strokeColorHexstringThe text stroke color in hex notation.
charSpacingnumberThe horizontal spacing behavior between text characters. This value is added to the natural spacing between characters while rendering the text. A positive value will cause characters to spread farther apart, while a negative value will bring characters closer together. Unit depends on the current ThermalLabel Unit property. Default value is 0
lineSpacingnumberThe vertical spacing behavior between lines of text. This value is added to the natural line spacing. A positive value will cause lines to spread farther apart, while a negative value will bring lines closer together. Unit depends on the current ThermalLabel Unit property. Default value is 0
validationRegExstringThe regular expression (must be based in the ECMAScript regex engine) that determines the pattern used to validate this text item. Default value is an empty string
validationErrorMessagestringThe text for the error message when validation fails. Default value is an empty string
multilinebooleanWhether the text can span more than one line. Default is true.
textVerticalAlignmentenum: Top | Bottom | MiddleThe alignment of the text. Default value is Top
minFontSizenumberThe minimum font size for FontSizeScaling, ParagraphScaling and ParagraphScalingAndFill Sizing options. Unit depends on the current Font Unit property. Default value is 0
useSlashedZerobooleanWhether zero char should be replaced by a zero with a slash through it. Default is false.
scaleXnumberThe scaling factor in the X direction. Default value is 1.
scaleYnumberThe scaling factor in the Y direction. Default value is 1.
BarcodeItem properties (168)
PropertyTypeDefaultDescription
namestringThe programmatic identifier or name assigned to the item. Default value is an empty string
xnumberThe x-coordinate of the upper-left corner of the item relative to the upper-left corner of its container. Default value is 0 (zero)
ynumberThe y-coordinate of the upper-left corner of the item relative to the upper-left corner of its container. Default value is 0 (zero)
dataFieldstringThe name of the field from the data source that contains the values to bind to this item. Default value is an empty string
dataFieldFormatStringstringThe string that specifies the display format for the value of the data field. Default value is an empty string
useCachebooleanWhether the item should be cached in the printer's memory. An item cannot be cached if it's bound to some data source field through the DataField property. Default value is false
cacheItemIdstringThe ID which will be assigned to the item in the cache. It must be a unique ID value for each item. The ID must be 1 to 8 alphanumeric [A-Z][0-9] characters long. If it's empty, then a random ID will be assigned automatically at runtime. Default value is an empty string
printAsGraphicbooleanWhether the item's output is forced to be printed as a graphic. Default is false.
visiblebooleanWhether the item is visible and printed. Default is true.
commentsstringThe comments associated to this item. Default is an empty string.
tagstringAn arbitrary string value that can be used to store custom information about this item. Default is an empty string.
lockedbooleanWhether this item cannot be inadvertently moved nor resized in the visual editor surface. Default is false.
editablebooleanWhether this item can be edited in the visual editor surface. Default is true.
resizablebooleanWhether this item can be resizable in the visual editor surface. Default is true.
expressionstringAn expression that will be evaluated when rendering this item. Default value is an empty string
isDesignTimebooleanWhether this item is in design time in the visual editor surface. Default is false.
groupNamestringThe group name which this item is part of. Default is empty.
readOnlybooleanWhether the source content of this item can be changed or not. Default is false.
typeNamestringThe Item Type name.
textstringThe additional text to show in the barcode image e.g. 'Product ID'. Note: This is not the value to encode. Default value is an empty string.
barColorenum: Black | WhiteThe bars' color of the barcode. Default value is Black.
barColorHexstringThe bars' background color in hex notation.
barHeightnumberThe bars' height of the barcode. Default value is 0.5
barWidthnumberThe narrow bars' width of the barcode. In barcode terminology this is X value. Default value is 0.0104
barRationumberThe wide bars' width compared to the narrow bars' width. In barcode terminology this is N value. Default value is 2
rotationAngleintegerThe rotation angle, in 90 degrees increments only, to apply on this item. It is measured clockwise from the x-axis. Default value is 0 (zero)
codabarStartCharenum: A | B | C | DThe start character for Codabar symbology. Possible values are: A, B, C or D. Default value is A
codabarStopCharenum: A | B | C | DThe stop character for Codabar symbology. Possible values are: A, B, C or D. Default value is A
displayStartStopCharbooleanWhether start and stop characters must be displayed on the barcode. Default value is true
codestringThe value to encode. Default value is "1234567890"
codeEncodingenum: Text | Base64 | HexThe character encoding format of the Code property value. Default value is Text
addChecksumbooleanWhether checksum must be calculated and attached to the value to encode. Default value is true
eanUpcGuardBarbooleanWhether guard bars must be drawn for EAN and UPC symbologies. Default value is true
eanUpcGuardBarHeightnumberThe guard bars' height. In general, this value should be a bit greater than the BarHeight property. Default value is 0.55
code128CharSetenum: Auto | A | B | CThe characters set to use in the Code 128 symbology. Possible values are: Auto, A, B or C. Default value is Auto
planetHeightTallBarnumberThe tall bars' height of Planet symbology. Default value is 0.2
planetHeightShortBarnumberThe short bars' height of Planet symbology. Default value is 0.1
postnetHeightTallBarnumberThe tall bars' height of Postnet symbology. Default value is 0.2
postnetHeightShortBarnumberThe short bars' height of Postnet symbology. Default value is 0.1
symbologyenum: Codabar | Code11 | Code16k | Code39 | Code93 | Code128 | DataMatrix | Ean8 … (186 values)The barcode symbology/standard to generate. Default value is Code39
quietZoneFrameThickness
displayChecksumbooleanWhether checksum value must be displayed after the value to encode on the barcode. Default value is true
displayCodebooleanWhether the value to encode must be displayed on the barcode. Default value is true
textAlignmentenum: AboveCenter | AboveLeft | AboveRight | AboveJustify | BelowCenter | BelowLeft | BelowRight | BelowJustifyThe text alignment for Text property. Default value is AboveCenter
codeAlignmentenum: AboveCenter | AboveLeft | AboveRight | AboveJustify | BelowCenter | BelowLeft | BelowRight | BelowJustifyThe text alignment for Code property. Default value is BelowCenter
code16kModeenum: Mode0 | Mode1 | Mode2The mode to use for Code16k symbology. Modes supported are: Mode 0, 1, and 2. Default value is Mode1
code39FullAsciiModebooleanWhether the Full ASCII mode (a.k.a. Extended version) for Code 39 symbology should be used. Default value is true
code93FullAsciiModebooleanWhether the Full ASCII mode (a.k.a. Extended version) for Code 93 symbology should be used. Default value is true
dataMatrixModuleSizenumberThe Data Matrix module size. The module is each indivual black square which composes the whole of Data Matrix symbol. Default value is 0.0417
dataMatrixProcessTildebooleanWhether tilde character '~' should be processed when Data Matrix code is being generated. Default value is false
dataMatrixFormatenum: Auto | AutoDMRE | C10X10 | C12X12 | C8X18 | C14X14 | C8X32 | C16X16 … (44 values)The Data Matrix Format to use on that symbology. Default value is Auto
dataMatrixEncodingenum: Auto | Ascii | C40 | Text | Base256 | AnsiX12 | EDIFACTThe Data Matrix Encoding to use on that symbology. Default value is Auto
eanUpcSupplementenum: None | Digits2 | Digits5The supplement type to use with EAN and UPC symbologies. Default value is None
eanUpcSupplementTopMarginnumberThe height of the margin above the EAN/UPC supplement bars. Default value is 0.15
eanUpcSupplementSeparationnumberThe gap separation between the barcode and its supplement. Default value is 0.15
eanUpcSupplementCodestringThe supplement value for EAN and UPC symbologies. Default value is "0"
upcESystemenum: System0 | System1The number system to use for UPC-E symbology. Default value is System0
pdf417RowsintegerThe number of rows to use for PDF417 symbology. Default value is 0 (Auto)
pdf417ColumnsintegerThe number of columns to use for PDF417 symbology. Default value is (Auto)
pdf417ErrorCorrectionLevelenum: Level0 | Level1 | Level2 | Level3 | Level4 | Level5 | Level6 | Level7 | Level8The Error Correction Level to apply for PDF417 symbology. Default value is Level2
pdf417CompactionTypeenum: Auto | Binary | Text | NumericThe Compaction Type to apply for PDF417 symbology. Default value is Auto
pdf417TruncatedbooleanWhether the right side of PDF417 barcode is truncated (removed). Default value is false
pdf417ProcessTildebooleanWhether tilde character '~' should be processed when PDF417 code is being generated. Default value is false
pdf417ByteEncodingNamestringThe Encoding Name (Code Page) to be used for PDF417 Byte Compaction mode. Default value is "ISO-8859-1".
postal4StateTrackerBarHeightnumberThe tracker bar's height. Default value is 0.08
postal4StateTrackerBarWidthnumberThe tracker bar's width. Default value is 0.0208
postal4StateBarsSpacingnumberThe gap spacing between bars. Default value is 0.0313
postal4StateAddStartStopCharbooleanWhether start and stop characters must be added and drawn on the barcode. Default value is true
bearerBarStyleenum: None | Frame | HorizontalRulesOr set the bearer bars' type that must be drawn with the barcode. Bearer bar is only available for 2 of 5, Code 128 and UCC.EAN 128 barcodes. Default value is None
bearerBarThicknessnumberThe bearer bars' thickness. Default value is 0.05
eanUpcDisplayLightMarginIndicatorbooleanWhether light margin indicators must be displayed in the EAN/UPC barcodes. Default value is false
qRCodeModuleSizenumberThe QR Code module size. The module is each indivual black square which composes the whole of QR Code symbol. Default value is 0.0417
qRCodeEncodingenum: Auto | Numeric | AlphaNumeric | Kanji | ByteThe QR Code Encoding to use on that symbology. Default value is Auto
qRCodeByteEncodingNamestringThe Encoding Name (Code Page) to be used for QR Code Byte Compaction mode. Default value is "ISO-8859-1"
qRCodeErrorCorrectionLevelenum: L | M | Q | HThe Error Correction Level to apply for QR Code symbology. Default value is M
qRCodeVersionenum: Auto | V01 | V02 | V03 | V04 | V05 | V06 | V07 … (41 values)The QR Code Version to use on that symbology. Default value is Auto
qRCodeMaskenum: Auto | Mask0 | Mask1 | Mask2 | Mask3 | Mask4 | Mask5 | Mask6 | Mask7The QR Code Mask pattern to use on that symbology. Default is Auto.
uspsFimPatternenum: A | B | C | DThe USPS FIM pattern to use on that symbology. Default value is A
uspsHorizontalBarsCountintegerThe number of horizontal bars to be drawn. Default value is 10
telepenEncodingenum: Ascii | NumericThe Telepen Encoding to use on that symbology. Default value is Ascii
pharmacodeThinBarWidthnumberThe width of Pharmacode Thin Bars. Default value is 0.0208
pharmacodeThickBarWidthnumberThe width of Pharmacode Thick Bars. Default value is 0.0625
pharmacodeBarsSpacingnumberThe gap between Pharmacode bars. Default value is 0.0417
backColorenum: Black | WhiteThe background color of the barcode. Default value is White
backColorHexstringThe background color of the barcode in hex notation.
fontFont
foreColorenum: Black | WhiteThe foreground color of the value to encode. Default value is Black
foreColorHexstringThe foreground color of the value to encode in hex notation.
textFontFont
textForeColorenum: Black | WhiteThe foreground color of the text. Default value is Black
textForeColorHexstringThe foreground color of the text in hex notation.
aztecCodeModuleSizenumberThe Aztec Code module size. The module is each indivual black square which composes the whole of Aztec Code symbol. Default value is 0.0417
aztecCodeFormatenum: Auto | C15X15Compact | C19X19 | C19X19Compact | C23X23 | C23X23Compact | C27X27 | C27X27Compact … (37 values)The Aztec Code Format to use on that symbology. Default value is Auto
aztecCodeErrorCorrectionintegerThe Error Correction Percentage to apply for Aztec Code symbology. Default value is 23.
aztecCodeRuneintegerThe Aztec Code Rune value. It must be a value from 0 to 255 and is available for Aztec Code Compact Format only. Default value is -1 (disabled)
aztecCodeByteEncodingNamestringThe Encoding Name (Code Page) to be used for Aztec Code symbology. Default value is "ISO-8859-1"
pdf417SegmentIndexintegerThe Segment Index for a Macro PDF417 symbol. Its value must be 0 (zero) up to 99998 and must be less than the value in Pdf417SegmentCount property. Default value is 0 (zero)
pdf417SegmentCountintegerThe number of Macro PDF417 symbols. Its value must be less than or equal to 99999. Default value is 0 (zero)
pdf417FileIdstringThe File ID of the Macro PDF417 symbol. Its value must be a sequence of codewords (Each codeword value must be a number between 000 and 899) and must be the same for all data segments. Default value is "000"
pdf417AspectRationumberThe ratio of the height to the overall width of the PDF417 symbol. Its value must be 0 (zero) up to 1 (one). Default value is 0 (zero)
microPdf417Versionenum: Auto | V1X11 | V1X14 | V1X17 | V1X20 | V1X24 | V1X28 | V2X8 … (35 values)The MicroPDF417 version (a predefined combinations of numbers of columns and rows) to be generated. Default value is Auto
isbt128DataStructureenum: DS001 | DS002 | DS003 | DS004 | DS005 | DS006 | DS007 | DS008 … (34 values)The ISBT 128 Data Structure to be generated. Default value is DS001
hibcFormatHumanReadableTextbooleanWhether the Human Readable Text is formatted as specified by HIBC Standards i.e. Zeros are displayed as Slashed-Zeros and the Space character is displayed as an Underscore. Default value is true
useQuietZoneForTextbooleanWhether quiet zones are used for drawing Text, Code and HumanReadableText properties. Default value is false
barWidthAdjustmentnumberThe Bar Width Adjustment. Default value is 0 (zero)
humanReadableTextstringThe Human Readable Text to be displayed instead of the value to encode specified in the Code property. Default value is an empty string
microQRCodeVersionenum: Auto | M1 | M2 | M3 | M4The Micro QR Code Version to use on that symbology. Default value is Auto
msiChecksumenum: OneMod10 | TwoMod10 | Mod11AndMod10The checksum mode to be used on MSI symbology. Default value is OneMod10
segmentsPerRowintegerThe number of segments per row to be used in GS1 DataBar Expanded Stacked or RSS Expanded Stacked symbologies. It must be an even number ranging from 2 up to 22. Default value is 4.
maxiCodeModeenum: Mode2 | Mode3 | Mode4 | Mode5 | Mode6The MaxiCode mode. Default value is Mode4
maxiCodeProcessTildebooleanWhether tilde character '~' should be processed when MaxiCode code is being generated. Default value is false
maxiCodeSymbolIndexintegerThe Symbol Index for a Structured Appended MaxiCode. Its value must be 1 up to 8 and must be less than the value in MaxiCodeSymbolCount property. Default value is 1
maxiCodeSymbolCountintegerThe number of MaxiCode symbols in a Structured Appended format. Its value must be less than or equal to 8. Default value is 1
aztecCodeProcessTildebooleanWhether tilde character '~' should be processed when Aztec Code is being generated. Default value is false
qRCodeProcessTildebooleanWhether tilde character '~' should be processed when QR Code is being generated. Default value is false
dataMatrixByteEncodingNamestringThe Encoding Name (Code Page) to be used for DataMatrix in Byte Compaction mode. Default value is "ISO-8859-1"
dataMatrixSymbolCountintegerThe number of Data Matrix symbols. Its value must be less than or equal to 16. Default value is 1
dataMatrixSymbolIndexintegerThe Index for a Data Matrix symbol. Its value must be 1 up to 16 and must be less than or equal to the value in DataMatrixSegmentCount property. Default value is 1
dataMatrixFileIdstringThe File ID of the Data Matrix symbol. Its value must be a sequence of codewords (Each codeword value must be a number between 001 and 254) and must be the same for all data segments. Default value is "001001"
sizingenum: None | Fill | FitProportional | AutoSizeThe barcode sizing. Default value is None
barcodeAlignmentenum: TopLeft | TopCenter | TopRight | MiddleLeft | MiddleCenter | MiddleRight | BottomLeft | BottomCenter | BottomRightThe barcode alignment. Default value is TopLeft
cornerRadiusRectangleCornerRadius
borderThicknessFrameThickness
borderColorenum: Black | WhiteThe color of the border of the rectangle container. Default value is Black
borderColorHexstringThe color of the border of the rectangle container in hex notation.
barcodePaddingFrameThickness
widthnumberThe width of the rectangle container. Default value is 1
heightnumberThe height of the rectangle container. Default value is 0.5
counterStepintegerThe step for the counter. The counter will increase (positive) or decrease (negative) by this number on every printed label. Default value is 0 (zero)
counterUseLeadingZerosbooleanWhether leading zeros are printed or suppressed when using counters. Default value is false
maskstringThe input Mask for the value to encode. Default value is an empty string
maskIncrementstringThe mask increment. The increment is the value to be added to the value to encode on each label to be printed. Default value is an empty string
hideIfEmptybooleanWhether the barcode symbol is not displayed or printed if the value to encode is empty. Default value is false
eanUpcMagnificationFactornumberThe Magnification Factor for EAN/UPC barcodes. Default is 0 (Zero/Disabled).
hibcUseIsoIec15434EncodingbooleanWhether the ISO/IEC 15434 Protocol is used to encode the HIBC LIC or PAS Data Structures in 2D symbols. Default is False.
codeFormatPatternstringThe string pattern to format the Code property. The result of the format process is the one which will be encoded! Based on String.Format(). Default value is empty (Disabled).
textFormatPatternstringThe string pattern to format the Text property. Based on String.Format(). Default value is empty (Disabled).
hanXinCodeByteEncodingNamestringThe Encoding Name (Code Page) to be used for Han Xin Code Binary Byte Encoding mode. Default it ISO-8859-1.
hanXinCodeEncodingenum: Auto | Numeric | Text | BinaryByte | ChineseReg1 | ChineseReg2 | GB18030Bytes2 | GB18030Bytes4The Han Xin Code Encoding to use on that symbology. Default value is Auto
hanXinCodeErrorCorrectionLevelenum: L1 | L2 | L3 | L4The Error Correction Level to apply for Han Xin Code symbology. Default value is L1
hanXinCodeVersionenum: Auto | V01 | V02 | V03 | V04 | V05 | V06 | V07 … (85 values)The Han Xin Code Version to use on that symbology. Default value is Auto
hanXinCodeModuleSizenumberThe module size. The unit of measure must be specified to BarcodeUnit property. Default value is 0.0417
hanXinCodeProcessTildebooleanWhether tilde character should be processed when Han Xin Code is being generated. Default value is false
itf14LeftHMarkenum: None | Mark1 | Mark2 | Mark3 | Mark4 | Mark5 | Mark6 | Mark7The H mark type for the left side of ITF-14 barcode symbol. Default is None.
itf14RightHMarkenum: None | Mark1 | Mark2 | Mark3 | Mark4 | Mark5 | Mark6 | Mark7The H mark type for the right side of ITF-14 barcode symbol. Default is None.
errorBehaviorenum: BlankImage | ThrowExceptionWhat output type BarcodeItem will generate if an error occurs during barcode rendering. Default is BlankImage.
gS1DataStrictValidationbooleanWhether to strictly validate the specified GS1 Element Strings i.e. Application Identifier plus Data Field based on GS1 General Specifications rules. Default is false.
maxiCodeDrawPixelBasedSymbolbooleanWhether the MaxiCode symbol is drawn by using a Pixel Based method; otherwise, a Vector based method is used. Default value is true
dotCodeModuleSizenumberThe module size. The unit of measure must be specified to BarcodeUnit property. Default value is 0.0417
dotCodeProcessTildebooleanWhether tilde character should be processed when DotCode is being generated. Default value is false
dotCodeColumnsintegerThe number of columns to use for DotCode symbology. Default is zero i.e. auto.
dotCodeRowsintegerThe number of rows to use for DotCode symbology. Default is zero i.e. auto.
dotCodeAspectRatiostringThe Columns (width) to Rows (height) Aspect Ratio for DotCode symbology. Aspect Ratio must be specified as C:R where C and R are integers e.g. 3:2
dotCodeModuleShapeenum: Circle | SquareThe shape of the modules that make the DotCode barcode symbol. Default is Circle.
dataMatrixIncludeRectFormatsInAutoModebooleanWhether to consider Rectangular DataMatrix Formats when DataMatrixFormat is set to Auto. Default is false.
code11TwoDigitsChecksumbooleanWhether Code 11 two digits checksum must be calculated and encoded. Defauls is false.
tlc39MicroPdf417BarWidthnumberThe narrow bar width for TLC39's MicroPdf417 symbol. The unit of measure must be specified to BarcodeUnit property.
tlc39MicroPdf417RowBarHeightnumberThe row bar height for TLC39's MicroPdf417 symbol. The unit of measure must be specified to BarcodeUnit property.
rightToLeftbooleanWhether the human readable text should draw right-to-left for RTL languages. Default value is false
rectMicroQRCodeVersionenum: Auto | R7x43 | R7x59 | R7x77 | R7x99 | R7x139 | R9x43 | R9x59 … (33 values)The Rectangular Micro QR Code Version to use on that symbology. Default value is Auto
artBarImagePatternstringThe image file (path or Base64 string) that will be used as a pattern to fill all the bars that compose the barcode symbol.
artLogoImagestringThe logo image file (path or Base64 string) that will be used to stamp it on top or bottom of the barcode symbol.
artLogoImagePositionenum: Top | BottomThe position of the logo image file on the barcode symbol. Default is Top.
artLogoImagePercentageintegerThe percentage used to resize the logo image based on the barcode symbol size. Default is 20.
artLogoImageOpacityintegerThe opacity [from 1 to 100 (fully opaque)] of the image logo file. Default is 100.
artModuleShapeenum: Rect | RoundRect | Dot | Circle | ZebraHorizontal | ZebraVertical | DiamondThe barcode symbol modules/bars artistic shape. Default is Rect.
artFinderShapeenum: Rect | RoundRect | CircleThe barcode symbol finders artistic shape. Default is Rect.
printAsResidentElementbooleanWhether the barcode is printed by using the resident command. Default is false.

Errors

If the conversion fails (for example, an invalid template or data source), the API returns HTTP 500 with an RFC 7807 ProblemDetails JSON body:

{
  "type": "https://tools.ietf.org/html/rfc7231#section-6.6.1",
  "title": "An error occurred while processing your request.",
  "status": 500,
  "detail": "<error message>"
}

Check detail for the cause. Common causes are a template that is not valid JSON/XML, an unknown typeName, or a dataSource that is not a JSON array or XML document.


Interactive Web API Doc (OpenAPI)

The same reference rendered from swagger.json. The container also serves Swagger UI unless you set SWAGGER_UI_ENABLED=false.


How to configure Custom TTF Fonts

Most labels that are designed might contain some texts, and these texts need to be rendered by using a given set of fonts. To make these fonts available for the ThermalLabel Web API for Docker to preview, render and convert the labels to the target format, then a special configuration must be performed.

NOTE: Fonts that are added to the ThermalLabel Web API for Docker remain the exclusive property of their specific owners and require a license from their owners.

The following steps show how to configure the ThermalLabel Web API for Docker to add support for Arial Unicode TTF font for rendering texts in different languages.

Custom Fonts Configuration Steps

  • Be sure you download the Arial Unicode font (in some Windows systems, that font is located at c:\Windows\Fonts\ARIALUNI.TTF). Remember that any added font remain the exclusive property of their specific owners and require a license from their owners.
  • Once you have the ARIALUNI.TTF font file, copy it to the Linux box where the ThermalLabel Web API instance will be running on.
  • In the home dir of your Linux box, create the following directory: MyThermalLabelSettings
  • Copy the ARIALUNI.TTF to the MyThermalLabelSettings directory
  • Create a plain text file and name it to fonts.json and then write or copy/paste the following content:

    
    [
      {
        "name": "Arial Unicode MS",
        "fileName": "ARIALUNI.TTF"
      }                                
    ]
                                

    This is a JSON Array for each font you want to upload to the virtual printer storage. Each JSON object representing a given custom font must be specified with the name of the font (it must be the same font family name specified by the TTF file) and the fileName which points to the physical font file.

  • Finally, to make the custom fonts available in the ThermalLabel Web API instance, we have to mount a volume to the instance in this way:

    AMD
    docker run -it -v ~/MyThermalLabelSettings:/app/Config --rm -p 8080:8080 neodynamic/thermallabelwebapi:7.0.1
    ARM
    docker run -it -v ~/MyThermalLabelSettings:/app/Config --rm -p 8080:8080 neodynamic/thermallabelwebapi:7.0.1-arm64
  • What about font family and styles like Bold and Italic?

    Font styles must be explicitly specified in the JSON file described above. For example, the following JSON will allow deploying the Arial Narrow Normal, Bold, Italic and Bold + Italic font files:

    
    [
      {
        "name": "Arial Narrow",
        "fileName": "ARIALN.TTF"
      },
      {
        "name": "Arial Narrow",
        "fileName": "ARIALNB.TTF",
        "bold": true
      },
      {
        "name": "Arial Narrow",
        "fileName": "ARIALNI.TTF",
        "italic": true
      },
      {
        "name": "Arial Narrow",
        "fileName": "ARIALNBI.TTF",
        "bold": true,                            
        "italic": true
      }                                
    ]
                                

Licensing

On-Premise - Full Deployment Control

ThermalLabel 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 ThermalLabel Web API for Docker, you are provided with license information (LICENSE_OWNER & LICENSE_KEY for the Web API - EDITOR_LICENSE_OWNER & EDITOR_LICENSE_KEY for the Web Label Editor) 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" -e "EDITOR_LICENSE_OWNER=YOUR-COMPANY-NAME" -e "EDITOR_LICENSE_KEY=YOUR_KEY" -p 8080:8080 neodynamic/thermallabelwebapi:7.0.1
ARM
docker run -it --rm -e "LICENSE_OWNER=YOUR-COMPANY-NAME" -e "LICENSE_KEY=YOUR_KEY" -e "EDITOR_LICENSE_OWNER=YOUR-COMPANY-NAME" -e "EDITOR_LICENSE_KEY=YOUR_KEY" -p 8080:8080 neodynamic/thermallabelwebapi:7.0.1-arm64

 Evaluation Mode

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


  • SVG barcode image formats require a license key, a blank image will be generated in TRIAL mode.
  • A TRIAL stamp will be rendered at the top of the rendering output.

 Want to try ThermalLabel Web API for Docker without TRIAL watermark?

We offer you a 30-day Evaluation License Key which will allow you to test the ThermalLabel Web API for Docker in fully-functional mode for 30 days! When the 30-day Evaluation License Key expires, the ThermalLabel Web API for Docker behavior backs to Trial mode. Request your 30-day Evaluation License Key now...

Which ThermalLabel Edition Do I Need?

The same label engine and the same XML/JSON label template format are shared by all ThermalLabel products, so a label designed in an editor can be printed with the SDK or converted with the Web API.

ProductBest forHow you use itPlatformsPrice
ThermalLabel SDK for .NET.NET apps: desktop, services, console, ASP.NET CoreC# / VB.NET library (NuGet Neodynamic.SDK.ThermalLabel)Windows, Linux, macOS (.NET Standard 2.0+)From USD 499
ThermalLabel Web API for Docker This pageAny language: Python, Node.js, Java, PHP, Go, C#…Self-hosted REST API in a Docker containerLinux container (amd64 & arm64)From USD 499
ThermalLabel Windows EditorEnd-user label designer inside your WinForms or WPF appVisual .NET control. Requires the SDKWindows (.NET Framework 4.6.1+ & .NET Core 3.1+)Add-on
ThermalLabel Web EditorEnd-user label designer inside your web appJavaScript component. Requires the SDK or the Web API for Docker as backendAny modern browser (Windows, Linux, macOS, Android)Add-on, from USD 899

Building with .NET? Use the SDK. Any other language, or a microservice architecture? Use the Web API for Docker. Need your end users to design their own labels? Add the Windows Editor (desktop, SDK only) or the Web Editor (browser, SDK or Docker).


ThermalLabel Web API for Docker FAQ

How do I generate ZPL from a JSON label template with a REST API?
Run docker run -p 8080:8080 neodynamic/thermallabelwebapi:7.0.1, then POST a JSON body with the template in the thermalLabel field to http://localhost:8080/ThermalLabel/Convert with the header Accept: application/vnd.zpl. The response is the ZPL code, which you can send raw to a Zebra printer, for example to port 9100.
Which output formats are supported?
Printer commands for Zebra ZPL and EPL, EPSON ESC/POS, Honeywell-Intermec Fingerprint and Direct Protocol, and HP PCL, plus PDF, PNG, JPEG, SVG, PCX and HTML. The format is selected with the Accept header; the +json and +zip variants return every label as a JSON array of Base64 data URIs or as a ZIP file.
How do I print many labels from a database or a list?
Bind text and barcode items to fields with dataField and send the rows in the dataSource field as a JSON array or XML. The API generates one label per row, and counters, data masking and 100+ expressions are applied, so you get a multipage PDF or a single stream of printer commands for the whole batch.
Where do I get the label template?
A template is the ThermalLabel object serialized as JSON or XML. You can write it by hand, export it from the ThermalLabel SDK for .NET with GetJsonTemplate(), let users design it in the ThermalLabel Web Editor, or start from the default objects returned by GET /ThermalLabel and GET /Items/{type}.
Can my users design labels visually with this Web API?
Yes. The ThermalLabel Web Editor (sold separately) can use the Web API container as its backend through the /ThermalLabelEditor endpoint, so no .NET server is needed. Register it with the EDITOR_LICENSE_OWNER and EDITOR_LICENSE_KEY environment variables; a sample project is available on GitHub (neodynamic/ThermalLabel-Web-API-Docker).
Does the Web API send the labels to the printer?
No. It returns the printer commands or documents, and your application sends them to the printer: over TCP port 9100, through a print queue such as CUPS (lpr -o raw), or from the browser to a client printer with JSPrintManager.
Which programming languages can I use?
Any language that can send an HTTP POST with JSON: Python, Node.js, JavaScript, Java, PHP, C#, Go, Ruby, Perl or curl. There is no SDK to install.
Does it run on ARM64 and Kubernetes?
Yes. Images are published for amd64 (neodynamic/thermallabelwebapi:7.0.1) and arm64 (neodynamic/thermallabelwebapi:7.0.1-arm64), and the container can run on any Docker host, Kubernetes cluster or cloud container service.
How do I use custom TrueType fonts?
Copy the TTF files and a fonts.json file that lists each font name, file name and style into a folder, and mount it in the container at /app/Config, for example -v ~/MyThermalLabelSettings:/app/Config.
How is it licensed and how much does it cost?
It is licensed for private on-premise deployments, with the license passed in the LICENSE_OWNER and LICENSE_KEY environment variables. Licenses start at USD 499 and include one year of updates and priority support.
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 SVG output is blank. A 30-day evaluation key is available on request to test without those limits.
Should I use the Web API for Docker or the ThermalLabel SDK for .NET?
Use the SDK for .NET applications that need an in-process library or want to print directly to USB, serial or Windows printers. Use the Web API for Docker for any other language, for microservices, or when you want a single label service shared by several applications.

 Latest Release: v7.0.1 2026-10-30

  • New! I18N props for Items Display Name.
  • Fixed! AutoSize for data-bound TextItem and BarcodeItem.

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