ThermalLabel Web API for Docker
Key Features
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
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 standardsGS1-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.Print Orientation & Multi-labels per Row Support
Most Thermal Printers do not support Print Orientation feature. ThermalLabel Web API fills that gap by providing you Portrait and Landscape print orientation with 90, 180 & 270 degrees rotation!A built-in mechanism for printing on media rolls featuring more than one single label per row (a.k.a. multi-column printing support) is also missing in most thermal printers. ThermalLabel Web API provides this feature out-of-the-box allowing you to print any number of labels per row!
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...
Overview
Designed by following some of the REST principles, ThermalLabel Web API for Docker responds to simple HTTP GET & POST requests by specifying the right parameters through a JSON object in the request body, returning the output processing in the raw commands, image or document formats specified through the Accept header.
Help Doc Topics
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:
AMDdocker pull neodynamic/thermallabelwebapi:7.0.1ARMdocker pull neodynamic/thermallabelwebapi:7.0.1-arm64To run the Docker image, please type the following from a Terminal:
AMDdocker run -it --rm -p 8080:8080 neodynamic/thermallabelwebapi:7.0.1ARMdocker 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"
- Auto HTTPS Redirection: By default, HTTPS redirection is enabled. It can be disabled by specifying the following parameter
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.
- Let's suppose you want to use port
12345, then run the docker image with the following parameters:
AMDdocker run -it --rm -p 12345:12345 -e ASPNETCORE_HTTP_PORTS=12345 neodynamic/thermallabelwebapi:7.0.1ARMdocker run -it --rm -p 12345:12345 -e ASPNETCORE_HTTP_PORTS=12345 neodynamic/thermallabelwebapi:7.0.1-arm64 - Special case for port
80: If you need to use port80, then run the docker image with the following parameters:
AMDdocker run -it --rm -p 80:80 -u root -e ASPNETCORE_HTTP_PORTS=80 neodynamic/thermallabelwebapi:7.0.1ARMdocker 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
| Method | Path | Description |
|---|---|---|
GET | /ThermalLabel | Returns a ThermalLabel. |
GET | /ThermalLabel/ThermalLabelPage | Returns a ThermalLabelPage. |
GET | /ThermalLabel/ThermalLabelFont | Returns a ThermalLabelFont. |
POST | /ThermalLabel/Convert | Converts a ThermalLabel template to Printer Commands, Images, and Documents formats. |
POST | /ThermalLabel/Thumbnail | Creates a thumbnail image of a ThermalLabel document. |
GET | /ThermalLabelEditor | Process the ThermalLabel Editor requests. |
POST | /ThermalLabelEditor | Process 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)
| Property | Type | Default | Description |
|---|---|---|---|
thermalLabel | string | The ThermalLabel template in XML, JSON or Base64 formats. | |
dataSource | string | The data source in XML or JSON formats to merge with the specified ThermalLabel. | |
dpi | integer | 96 | The output image resolution. |
pageOrientation | enum: Portrait | Landscape90 | Portrait180 | Landscape270 | Portrait | The page orientation. |
copies | integer | 1 | The number of print copies. |
replicates | integer | 0 | The number of print replicates. |
pdfMetadata | PdfMetadata | PDF document properties (see below). | |
scaleX | number | 1 | The scaling factor in the X direction for Image conversion. |
scaleY | number | 1 | The 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)
| Property | Type | Default | Description |
|---|---|---|---|
thermalLabel | string | The ThermalLabel document in XML, JSON or Base64 formats. | |
dataSource | string | The data source in XML or JSON formats to merge with the specified ThermalLabel. | |
size | integer | 200 | The output image size in pixel unit. |
dpi | integer | 96 | The output image resolution. |
ignoreExpressions | boolean | false | Whether any expressions found in the label should be ignored. |
ignoreDataFields | boolean | false | Whether 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.
| Property | Type | Default | Description |
|---|---|---|---|
width | number | The width of the thermal label. The unit of measurement is specified by UnitType property. Default value is 1 | |
height | number | The height of the thermal label. The unit of measurement is specified by UnitType property. Default value is 1 | |
unitType | enum: Cm | Inch | Mm | DotsPerInch | Point | Pica | Mils | Twip | The 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 | |
items | array of object | The list of Items composing the label. | |
dataFieldReplicates | string | The 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 | |
gapLength | number | The vertical gap length between labels. The unit of measurement is specified by UnitType property. Default value is 0 (zero) | |
markLength | number | The mark length or thickness between labels. The unit of measurement is specified by UnitType property. Default value is 0 (zero) | |
offsetLength | number | The offset length or thickness between labels. The unit of measurement is specified by UnitType property. Default value is 0 (zero) | |
labelsPerRow | integer | The number of labels per row in the media roll. Default value is 1 | |
labelsHorizontalGapLength | number | The 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) | |
isContinuous | boolean | Whether this ThermalLabel is on a continuous media roll i.e. labels are not separated by gaps, spaces, notches, slots, or holes. Default is false. | |
shape | enum: Rectangle | Ellipse | The shape of this ThermalLabel. Default is Rectangle. | |
printSpeed | string | The 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. | |
printMirror | boolean | Whether this label is printed as a mirror image. Default is false. | |
cutAfterPrinting | boolean | Whether this label is cut after printing. Default is false. | |
batchCut | integer | Number of labels after which the cut will be performed. Default is 1. | |
darkness | number | The output printing darkness setting which depends on the target printer type. | |
expressions | array of object | The list of Expressions to apply on the label. | |
sheetLabelsWidth | number | The 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. | |
sheetLabelsHeight | number | The 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. | |
sheetLabelsCount | integer | The total number individual labels of the Sheet Labels where this thermal label is part of. Default value is 0. | |
sheetLabelsMargin | FrameThickness | ||
margin | FrameThickness | ||
useDefaultMediaType | boolean | Whether to use the default printer configuration for Media Type (Continuous, Web sensing, Mark sensing, etc). Default is false. | |
designBackgroundImage | string | A 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. | |
isDuplexDesign | boolean | Whether this label is a duplex design. Default is false. | |
tag | string | An arbitrary string value that can be used to store custom information about this label. Default is an empty string. | |
isSheetOfLabels | boolean | Whether this label is a Sheet of labels type. | |
pages | array of object | The list of ThermalLabelPage objects representing the pages within this label. | |
fonts | array of object | The list of ThermalLabelFont objects representing the embedded fonts within this label. | |
isDataBound | boolean | Whether any Item in the current label is data bound. |
TextItem properties (57)
| Property | Type | Default | Description |
|---|---|---|---|
name | string | The programmatic identifier or name assigned to the item. Default value is an empty string | |
x | number | The x-coordinate of the upper-left corner of the item relative to the upper-left corner of its container. Default value is 0 (zero) | |
y | number | The y-coordinate of the upper-left corner of the item relative to the upper-left corner of its container. Default value is 0 (zero) | |
dataField | string | The name of the field from the data source that contains the values to bind to this item. Default value is an empty string | |
dataFieldFormatString | string | The string that specifies the display format for the value of the data field. Default value is an empty string | |
useCache | boolean | Whether 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 | |
cacheItemId | string | The 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 | |
printAsGraphic | boolean | Whether the item's output is forced to be printed as a graphic. Default is false. | |
visible | boolean | Whether the item is visible and printed. Default is true. | |
comments | string | The comments associated to this item. Default is an empty string. | |
tag | string | An arbitrary string value that can be used to store custom information about this item. Default is an empty string. | |
locked | boolean | Whether this item cannot be inadvertently moved nor resized in the visual editor surface. Default is false. | |
editable | boolean | Whether this item can be edited in the visual editor surface. Default is true. | |
resizable | boolean | Whether this item can be resizable in the visual editor surface. Default is true. | |
expression | string | An expression that will be evaluated when rendering this item. Default value is an empty string | |
isDesignTime | boolean | Whether this item is in design time in the visual editor surface. Default is false. | |
groupName | string | The group name which this item is part of. Default is empty. | |
readOnly | boolean | Whether the source content of this item can be changed or not. Default is false. | |
typeName | string | The Item Type name. | |
text | string | The text. Default value is an empty string | |
font | Font | ||
foreColor | enum: Black | White | The foreground color of the text. Default value is Black | |
foreColorHex | string | The foreground color of the text in hex notation. | |
rotationAngle | integer | The rotation angle to apply on this item. It is measured clockwise from the x-axis. Default value is 0 (zero) | |
width | number | The width of the text item. Default value is 1 | |
height | number | The height of the text item. Default value is 0.5 | |
counterStep | integer | The step for the counter. The counter will increase (positive) or decrease (negative) by this number on every printed label. Default value is 0 (zero) | |
counterUseLeadingZeros | boolean | Whether leading zeros are printed or suppressed when using counters. Default value is false | |
mask | string | The input Mask for the text. Default value is an empty string | |
maskIncrement | string | The 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 | |
rightToLeft | boolean | Whether the text should draw right-to-left for RTL languages. Default value is false | |
sizing | enum: None | Stretch | FontSizeScaling | ParagraphScaling | Arc | Vertical | OuterArc | ParagraphScalingAndFill | AutoSize | OverflowSplit | The text sizing. Default value is None | |
cornerRadius | RectangleCornerRadius | ||
borderThickness | FrameThickness | ||
borderColor | enum: Black | White | The color of the border of the rectangle container. Default value is Black | |
borderColorHex | string | The color of the border of the rectangle container in hex notation. | |
backColor | enum: Black | White | The background color of the text. Default value is White | |
backColorHex | string | The background color of the text in hex notation. | |
textPadding | FrameThickness | ||
textAlignment | enum: Left | Center | Right | Justify | The alignment of the text. Default value is Left | |
cultureName | string | The Culture Name for text formatting. Default is en-US. Other sample values: de-DE, es-ES, etc. Any value supported by .NET CultureInfo class. | |
maxLength | integer | The maximum number of characters allowed for this text item object. Default is 0 which means that unlimited number of characters will be allowed. | |
hideIfEmpty | boolean | Whether this text item is not displayed or printed if the value to encode is empty. Default value is false | |
inputMaskPattern | string | The input mask pattern to use at design time on the label editor. Default is an empty string. | |
inputMaskPromptChar | string | The 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 (_). | |
strokeThickness | number | The text stroke thickness. Default value is 0. | |
strokeColorHex | string | The text stroke color in hex notation. | |
charSpacing | number | The 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 | |
lineSpacing | number | The 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 | |
validationRegEx | string | The 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 | |
validationErrorMessage | string | The text for the error message when validation fails. Default value is an empty string | |
multiline | boolean | Whether the text can span more than one line. Default is true. | |
textVerticalAlignment | enum: Top | Bottom | Middle | The alignment of the text. Default value is Top | |
minFontSize | number | The minimum font size for FontSizeScaling, ParagraphScaling and ParagraphScalingAndFill Sizing options. Unit depends on the current Font Unit property. Default value is 0 | |
useSlashedZero | boolean | Whether zero char should be replaced by a zero with a slash through it. Default is false. | |
scaleX | number | The scaling factor in the X direction. Default value is 1. | |
scaleY | number | The scaling factor in the Y direction. Default value is 1. |
BarcodeItem properties (168)
| Property | Type | Default | Description |
|---|---|---|---|
name | string | The programmatic identifier or name assigned to the item. Default value is an empty string | |
x | number | The x-coordinate of the upper-left corner of the item relative to the upper-left corner of its container. Default value is 0 (zero) | |
y | number | The y-coordinate of the upper-left corner of the item relative to the upper-left corner of its container. Default value is 0 (zero) | |
dataField | string | The name of the field from the data source that contains the values to bind to this item. Default value is an empty string | |
dataFieldFormatString | string | The string that specifies the display format for the value of the data field. Default value is an empty string | |
useCache | boolean | Whether 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 | |
cacheItemId | string | The 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 | |
printAsGraphic | boolean | Whether the item's output is forced to be printed as a graphic. Default is false. | |
visible | boolean | Whether the item is visible and printed. Default is true. | |
comments | string | The comments associated to this item. Default is an empty string. | |
tag | string | An arbitrary string value that can be used to store custom information about this item. Default is an empty string. | |
locked | boolean | Whether this item cannot be inadvertently moved nor resized in the visual editor surface. Default is false. | |
editable | boolean | Whether this item can be edited in the visual editor surface. Default is true. | |
resizable | boolean | Whether this item can be resizable in the visual editor surface. Default is true. | |
expression | string | An expression that will be evaluated when rendering this item. Default value is an empty string | |
isDesignTime | boolean | Whether this item is in design time in the visual editor surface. Default is false. | |
groupName | string | The group name which this item is part of. Default is empty. | |
readOnly | boolean | Whether the source content of this item can be changed or not. Default is false. | |
typeName | string | The Item Type name. | |
text | string | The 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. | |
barColor | enum: Black | White | The bars' color of the barcode. Default value is Black. | |
barColorHex | string | The bars' background color in hex notation. | |
barHeight | number | The bars' height of the barcode. Default value is 0.5 | |
barWidth | number | The narrow bars' width of the barcode. In barcode terminology this is X value. Default value is 0.0104 | |
barRatio | number | The wide bars' width compared to the narrow bars' width. In barcode terminology this is N value. Default value is 2 | |
rotationAngle | integer | The 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) | |
codabarStartChar | enum: A | B | C | D | The start character for Codabar symbology. Possible values are: A, B, C or D. Default value is A | |
codabarStopChar | enum: A | B | C | D | The stop character for Codabar symbology. Possible values are: A, B, C or D. Default value is A | |
displayStartStopChar | boolean | Whether start and stop characters must be displayed on the barcode. Default value is true | |
code | string | The value to encode. Default value is "1234567890" | |
codeEncoding | enum: Text | Base64 | Hex | The character encoding format of the Code property value. Default value is Text | |
addChecksum | boolean | Whether checksum must be calculated and attached to the value to encode. Default value is true | |
eanUpcGuardBar | boolean | Whether guard bars must be drawn for EAN and UPC symbologies. Default value is true | |
eanUpcGuardBarHeight | number | The guard bars' height. In general, this value should be a bit greater than the BarHeight property. Default value is 0.55 | |
code128CharSet | enum: Auto | A | B | C | The characters set to use in the Code 128 symbology. Possible values are: Auto, A, B or C. Default value is Auto | |
planetHeightTallBar | number | The tall bars' height of Planet symbology. Default value is 0.2 | |
planetHeightShortBar | number | The short bars' height of Planet symbology. Default value is 0.1 | |
postnetHeightTallBar | number | The tall bars' height of Postnet symbology. Default value is 0.2 | |
postnetHeightShortBar | number | The short bars' height of Postnet symbology. Default value is 0.1 | |
symbology | enum: Codabar | Code11 | Code16k | Code39 | Code93 | Code128 | DataMatrix | Ean8 … (186 values) | The barcode symbology/standard to generate. Default value is Code39 | |
quietZone | FrameThickness | ||
displayChecksum | boolean | Whether checksum value must be displayed after the value to encode on the barcode. Default value is true | |
displayCode | boolean | Whether the value to encode must be displayed on the barcode. Default value is true | |
textAlignment | enum: AboveCenter | AboveLeft | AboveRight | AboveJustify | BelowCenter | BelowLeft | BelowRight | BelowJustify | The text alignment for Text property. Default value is AboveCenter | |
codeAlignment | enum: AboveCenter | AboveLeft | AboveRight | AboveJustify | BelowCenter | BelowLeft | BelowRight | BelowJustify | The text alignment for Code property. Default value is BelowCenter | |
code16kMode | enum: Mode0 | Mode1 | Mode2 | The mode to use for Code16k symbology. Modes supported are: Mode 0, 1, and 2. Default value is Mode1 | |
code39FullAsciiMode | boolean | Whether the Full ASCII mode (a.k.a. Extended version) for Code 39 symbology should be used. Default value is true | |
code93FullAsciiMode | boolean | Whether the Full ASCII mode (a.k.a. Extended version) for Code 93 symbology should be used. Default value is true | |
dataMatrixModuleSize | number | The Data Matrix module size. The module is each indivual black square which composes the whole of Data Matrix symbol. Default value is 0.0417 | |
dataMatrixProcessTilde | boolean | Whether tilde character '~' should be processed when Data Matrix code is being generated. Default value is false | |
dataMatrixFormat | enum: Auto | AutoDMRE | C10X10 | C12X12 | C8X18 | C14X14 | C8X32 | C16X16 … (44 values) | The Data Matrix Format to use on that symbology. Default value is Auto | |
dataMatrixEncoding | enum: Auto | Ascii | C40 | Text | Base256 | AnsiX12 | EDIFACT | The Data Matrix Encoding to use on that symbology. Default value is Auto | |
eanUpcSupplement | enum: None | Digits2 | Digits5 | The supplement type to use with EAN and UPC symbologies. Default value is None | |
eanUpcSupplementTopMargin | number | The height of the margin above the EAN/UPC supplement bars. Default value is 0.15 | |
eanUpcSupplementSeparation | number | The gap separation between the barcode and its supplement. Default value is 0.15 | |
eanUpcSupplementCode | string | The supplement value for EAN and UPC symbologies. Default value is "0" | |
upcESystem | enum: System0 | System1 | The number system to use for UPC-E symbology. Default value is System0 | |
pdf417Rows | integer | The number of rows to use for PDF417 symbology. Default value is 0 (Auto) | |
pdf417Columns | integer | The number of columns to use for PDF417 symbology. Default value is (Auto) | |
pdf417ErrorCorrectionLevel | enum: Level0 | Level1 | Level2 | Level3 | Level4 | Level5 | Level6 | Level7 | Level8 | The Error Correction Level to apply for PDF417 symbology. Default value is Level2 | |
pdf417CompactionType | enum: Auto | Binary | Text | Numeric | The Compaction Type to apply for PDF417 symbology. Default value is Auto | |
pdf417Truncated | boolean | Whether the right side of PDF417 barcode is truncated (removed). Default value is false | |
pdf417ProcessTilde | boolean | Whether tilde character '~' should be processed when PDF417 code is being generated. Default value is false | |
pdf417ByteEncodingName | string | The Encoding Name (Code Page) to be used for PDF417 Byte Compaction mode. Default value is "ISO-8859-1". | |
postal4StateTrackerBarHeight | number | The tracker bar's height. Default value is 0.08 | |
postal4StateTrackerBarWidth | number | The tracker bar's width. Default value is 0.0208 | |
postal4StateBarsSpacing | number | The gap spacing between bars. Default value is 0.0313 | |
postal4StateAddStartStopChar | boolean | Whether start and stop characters must be added and drawn on the barcode. Default value is true | |
bearerBarStyle | enum: None | Frame | HorizontalRules | Or 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 | |
bearerBarThickness | number | The bearer bars' thickness. Default value is 0.05 | |
eanUpcDisplayLightMarginIndicator | boolean | Whether light margin indicators must be displayed in the EAN/UPC barcodes. Default value is false | |
qRCodeModuleSize | number | The QR Code module size. The module is each indivual black square which composes the whole of QR Code symbol. Default value is 0.0417 | |
qRCodeEncoding | enum: Auto | Numeric | AlphaNumeric | Kanji | Byte | The QR Code Encoding to use on that symbology. Default value is Auto | |
qRCodeByteEncodingName | string | The Encoding Name (Code Page) to be used for QR Code Byte Compaction mode. Default value is "ISO-8859-1" | |
qRCodeErrorCorrectionLevel | enum: L | M | Q | H | The Error Correction Level to apply for QR Code symbology. Default value is M | |
qRCodeVersion | enum: Auto | V01 | V02 | V03 | V04 | V05 | V06 | V07 … (41 values) | The QR Code Version to use on that symbology. Default value is Auto | |
qRCodeMask | enum: Auto | Mask0 | Mask1 | Mask2 | Mask3 | Mask4 | Mask5 | Mask6 | Mask7 | The QR Code Mask pattern to use on that symbology. Default is Auto. | |
uspsFimPattern | enum: A | B | C | D | The USPS FIM pattern to use on that symbology. Default value is A | |
uspsHorizontalBarsCount | integer | The number of horizontal bars to be drawn. Default value is 10 | |
telepenEncoding | enum: Ascii | Numeric | The Telepen Encoding to use on that symbology. Default value is Ascii | |
pharmacodeThinBarWidth | number | The width of Pharmacode Thin Bars. Default value is 0.0208 | |
pharmacodeThickBarWidth | number | The width of Pharmacode Thick Bars. Default value is 0.0625 | |
pharmacodeBarsSpacing | number | The gap between Pharmacode bars. Default value is 0.0417 | |
backColor | enum: Black | White | The background color of the barcode. Default value is White | |
backColorHex | string | The background color of the barcode in hex notation. | |
font | Font | ||
foreColor | enum: Black | White | The foreground color of the value to encode. Default value is Black | |
foreColorHex | string | The foreground color of the value to encode in hex notation. | |
textFont | Font | ||
textForeColor | enum: Black | White | The foreground color of the text. Default value is Black | |
textForeColorHex | string | The foreground color of the text in hex notation. | |
aztecCodeModuleSize | number | The Aztec Code module size. The module is each indivual black square which composes the whole of Aztec Code symbol. Default value is 0.0417 | |
aztecCodeFormat | enum: Auto | C15X15Compact | C19X19 | C19X19Compact | C23X23 | C23X23Compact | C27X27 | C27X27Compact … (37 values) | The Aztec Code Format to use on that symbology. Default value is Auto | |
aztecCodeErrorCorrection | integer | The Error Correction Percentage to apply for Aztec Code symbology. Default value is 23. | |
aztecCodeRune | integer | The 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) | |
aztecCodeByteEncodingName | string | The Encoding Name (Code Page) to be used for Aztec Code symbology. Default value is "ISO-8859-1" | |
pdf417SegmentIndex | integer | The 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) | |
pdf417SegmentCount | integer | The number of Macro PDF417 symbols. Its value must be less than or equal to 99999. Default value is 0 (zero) | |
pdf417FileId | string | The 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" | |
pdf417AspectRatio | number | The 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) | |
microPdf417Version | enum: 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 | |
isbt128DataStructure | enum: DS001 | DS002 | DS003 | DS004 | DS005 | DS006 | DS007 | DS008 … (34 values) | The ISBT 128 Data Structure to be generated. Default value is DS001 | |
hibcFormatHumanReadableText | boolean | Whether 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 | |
useQuietZoneForText | boolean | Whether quiet zones are used for drawing Text, Code and HumanReadableText properties. Default value is false | |
barWidthAdjustment | number | The Bar Width Adjustment. Default value is 0 (zero) | |
humanReadableText | string | The Human Readable Text to be displayed instead of the value to encode specified in the Code property. Default value is an empty string | |
microQRCodeVersion | enum: Auto | M1 | M2 | M3 | M4 | The Micro QR Code Version to use on that symbology. Default value is Auto | |
msiChecksum | enum: OneMod10 | TwoMod10 | Mod11AndMod10 | The checksum mode to be used on MSI symbology. Default value is OneMod10 | |
segmentsPerRow | integer | The 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. | |
maxiCodeMode | enum: Mode2 | Mode3 | Mode4 | Mode5 | Mode6 | The MaxiCode mode. Default value is Mode4 | |
maxiCodeProcessTilde | boolean | Whether tilde character '~' should be processed when MaxiCode code is being generated. Default value is false | |
maxiCodeSymbolIndex | integer | The 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 | |
maxiCodeSymbolCount | integer | The number of MaxiCode symbols in a Structured Appended format. Its value must be less than or equal to 8. Default value is 1 | |
aztecCodeProcessTilde | boolean | Whether tilde character '~' should be processed when Aztec Code is being generated. Default value is false | |
qRCodeProcessTilde | boolean | Whether tilde character '~' should be processed when QR Code is being generated. Default value is false | |
dataMatrixByteEncodingName | string | The Encoding Name (Code Page) to be used for DataMatrix in Byte Compaction mode. Default value is "ISO-8859-1" | |
dataMatrixSymbolCount | integer | The number of Data Matrix symbols. Its value must be less than or equal to 16. Default value is 1 | |
dataMatrixSymbolIndex | integer | The 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 | |
dataMatrixFileId | string | The 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" | |
sizing | enum: None | Fill | FitProportional | AutoSize | The barcode sizing. Default value is None | |
barcodeAlignment | enum: TopLeft | TopCenter | TopRight | MiddleLeft | MiddleCenter | MiddleRight | BottomLeft | BottomCenter | BottomRight | The barcode alignment. Default value is TopLeft | |
cornerRadius | RectangleCornerRadius | ||
borderThickness | FrameThickness | ||
borderColor | enum: Black | White | The color of the border of the rectangle container. Default value is Black | |
borderColorHex | string | The color of the border of the rectangle container in hex notation. | |
barcodePadding | FrameThickness | ||
width | number | The width of the rectangle container. Default value is 1 | |
height | number | The height of the rectangle container. Default value is 0.5 | |
counterStep | integer | The step for the counter. The counter will increase (positive) or decrease (negative) by this number on every printed label. Default value is 0 (zero) | |
counterUseLeadingZeros | boolean | Whether leading zeros are printed or suppressed when using counters. Default value is false | |
mask | string | The input Mask for the value to encode. Default value is an empty string | |
maskIncrement | string | The 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 | |
hideIfEmpty | boolean | Whether the barcode symbol is not displayed or printed if the value to encode is empty. Default value is false | |
eanUpcMagnificationFactor | number | The Magnification Factor for EAN/UPC barcodes. Default is 0 (Zero/Disabled). | |
hibcUseIsoIec15434Encoding | boolean | Whether the ISO/IEC 15434 Protocol is used to encode the HIBC LIC or PAS Data Structures in 2D symbols. Default is False. | |
codeFormatPattern | string | The 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). | |
textFormatPattern | string | The string pattern to format the Text property. Based on String.Format(). Default value is empty (Disabled). | |
hanXinCodeByteEncodingName | string | The Encoding Name (Code Page) to be used for Han Xin Code Binary Byte Encoding mode. Default it ISO-8859-1. | |
hanXinCodeEncoding | enum: Auto | Numeric | Text | BinaryByte | ChineseReg1 | ChineseReg2 | GB18030Bytes2 | GB18030Bytes4 | The Han Xin Code Encoding to use on that symbology. Default value is Auto | |
hanXinCodeErrorCorrectionLevel | enum: L1 | L2 | L3 | L4 | The Error Correction Level to apply for Han Xin Code symbology. Default value is L1 | |
hanXinCodeVersion | enum: Auto | V01 | V02 | V03 | V04 | V05 | V06 | V07 … (85 values) | The Han Xin Code Version to use on that symbology. Default value is Auto | |
hanXinCodeModuleSize | number | The module size. The unit of measure must be specified to BarcodeUnit property. Default value is 0.0417 | |
hanXinCodeProcessTilde | boolean | Whether tilde character should be processed when Han Xin Code is being generated. Default value is false | |
itf14LeftHMark | enum: None | Mark1 | Mark2 | Mark3 | Mark4 | Mark5 | Mark6 | Mark7 | The H mark type for the left side of ITF-14 barcode symbol. Default is None. | |
itf14RightHMark | enum: None | Mark1 | Mark2 | Mark3 | Mark4 | Mark5 | Mark6 | Mark7 | The H mark type for the right side of ITF-14 barcode symbol. Default is None. | |
errorBehavior | enum: BlankImage | ThrowException | What output type BarcodeItem will generate if an error occurs during barcode rendering. Default is BlankImage. | |
gS1DataStrictValidation | boolean | Whether to strictly validate the specified GS1 Element Strings i.e. Application Identifier plus Data Field based on GS1 General Specifications rules. Default is false. | |
maxiCodeDrawPixelBasedSymbol | boolean | Whether the MaxiCode symbol is drawn by using a Pixel Based method; otherwise, a Vector based method is used. Default value is true | |
dotCodeModuleSize | number | The module size. The unit of measure must be specified to BarcodeUnit property. Default value is 0.0417 | |
dotCodeProcessTilde | boolean | Whether tilde character should be processed when DotCode is being generated. Default value is false | |
dotCodeColumns | integer | The number of columns to use for DotCode symbology. Default is zero i.e. auto. | |
dotCodeRows | integer | The number of rows to use for DotCode symbology. Default is zero i.e. auto. | |
dotCodeAspectRatio | string | The 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 | |
dotCodeModuleShape | enum: Circle | Square | The shape of the modules that make the DotCode barcode symbol. Default is Circle. | |
dataMatrixIncludeRectFormatsInAutoMode | boolean | Whether to consider Rectangular DataMatrix Formats when DataMatrixFormat is set to Auto. Default is false. | |
code11TwoDigitsChecksum | boolean | Whether Code 11 two digits checksum must be calculated and encoded. Defauls is false. | |
tlc39MicroPdf417BarWidth | number | The narrow bar width for TLC39's MicroPdf417 symbol. The unit of measure must be specified to BarcodeUnit property. | |
tlc39MicroPdf417RowBarHeight | number | The row bar height for TLC39's MicroPdf417 symbol. The unit of measure must be specified to BarcodeUnit property. | |
rightToLeft | boolean | Whether the human readable text should draw right-to-left for RTL languages. Default value is false | |
rectMicroQRCodeVersion | enum: 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 | |
artBarImagePattern | string | The image file (path or Base64 string) that will be used as a pattern to fill all the bars that compose the barcode symbol. | |
artLogoImage | string | The logo image file (path or Base64 string) that will be used to stamp it on top or bottom of the barcode symbol. | |
artLogoImagePosition | enum: Top | Bottom | The position of the logo image file on the barcode symbol. Default is Top. | |
artLogoImagePercentage | integer | The percentage used to resize the logo image based on the barcode symbol size. Default is 20. | |
artLogoImageOpacity | integer | The opacity [from 1 to 100 (fully opaque)] of the image logo file. Default is 100. | |
artModuleShape | enum: Rect | RoundRect | Dot | Circle | ZebraHorizontal | ZebraVertical | Diamond | The barcode symbol modules/bars artistic shape. Default is Rect. | |
artFinderShape | enum: Rect | RoundRect | Circle | The barcode symbol finders artistic shape. Default is Rect. | |
printAsResidentElement | boolean | Whether 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.
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.TTFfont 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.TTFto theMyThermalLabelSettingsdirectory - Create a plain text file and name it to
fonts.jsonand 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 thenameof the font (it must be the same font family name specified by the TTF file) and thefileNamewhich 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:
AMDdocker run -it -v ~/MyThermalLabelSettings:/app/Config --rm -p 8080:8080 neodynamic/thermallabelwebapi:7.0.1ARMdocker 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:
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.
| Product | Best for | How you use it | Platforms | Price |
|---|---|---|---|---|
| ThermalLabel SDK for .NET | .NET apps: desktop, services, console, ASP.NET Core | C# / VB.NET library (NuGet Neodynamic.SDK.ThermalLabel) | Windows, Linux, macOS (.NET Standard 2.0+) | From USD 499 |
| ThermalLabel Web API for Docker This page | Any language: Python, Node.js, Java, PHP, Go, C#… | Self-hosted REST API in a Docker container | Linux container (amd64 & arm64) | From USD 499 |
| ThermalLabel Windows Editor | End-user label designer inside your WinForms or WPF app | Visual .NET control. Requires the SDK | Windows (.NET Framework 4.6.1+ & .NET Core 3.1+) | Add-on |
| ThermalLabel Web Editor | End-user label designer inside your web app | JavaScript component. Requires the SDK or the Web API for Docker as backend | Any 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.
