Quickstart
The fastest way to integrate LabelZoom is an official SDK. Install it, and converting ZPL to a PDF is one call:
npm install @labelzoom/sdkimport { writeFile } from 'node:fs/promises';import { LabelZoomClient } from '@labelzoom/sdk';
const client = new LabelZoomClient(); // reads LABELZOOM_API_KEY; anonymous if unset
const result = await client.convert() .fromZpl('^XA^FO50,50^ADN,36,20^FDLabelZoom^FS^XZ') .toPdf() .withLabelSize(4, 6) // inches .withDpi(203) .execute();
await writeFile('label.pdf', result.bytes);Node 20+, no runtime dependencies. → Full JavaScript quickstart
pip install labelzoom-sdkfrom pathlib import Pathfrom labelzoom import LabelZoomClient
with LabelZoomClient() as client: # reads LABELZOOM_API_KEY; anonymous if unset result = client.convert( "zpl", "pdf", "^XA^FO50,50^ADN,36,20^FDLabelZoom^FS^XZ", label_width=4, label_height=6, # inches dpi=203, )
Path("label.pdf").write_bytes(result.content)Python 3.10+, fully typed, sync and async clients. → Full Python quickstart
implementation 'com.labelzoom:labelzoom-sdk:1.0.0'try (LabelZoomClient client = LabelZoomClient.builder().build()) { // reads LABELZOOM_API_KEY ConversionResult result = client.convert() .fromZpl("^XA^FO50,50^ADN,36,20^FDLabelZoom^FS^XZ") .toPdf() .withLabelSize(4f, 6f) // inches .withDpi(203) .execute();
result.save(Path.of("label.pdf"));}Java 17+, zero runtime dependencies. → Full Java quickstart
dotnet add package LabelZoom.Sdkusing LabelZoom.Sdk;
using var client = new LabelZoomClient(); // reads LABELZOOM_API_KEY; anonymous if unset
var result = await client.Convert() .FromZpl("^XA^FO50,50^ADN,36,20^FDLabelZoom^FS^XZ") .ToPdf() .WithLabelSize(widthInches: 4f, heightInches: 6f) .WithDpi(203) .ExecuteAsync();
result.Save("label.pdf");netstandard2.0 and net8.0 — .NET Framework 4.6.1+, .NET Core 2.0+, .NET 5+. → Full C# quickstart
composer require labelzoom/sdkuse LabelZoom\Sdk\LabelZoomClient;
$client = new LabelZoomClient(); // reads LABELZOOM_API_KEY; anonymous if unset
$result = $client->convert() ->fromZpl('^XA^FO50,50^ADN,36,20^FDLabelZoom^FS^XZ') ->toPdf() ->withLabelSize(widthInches: 4, heightInches: 6) ->withDpi(203) ->execute();
$result->save('label.pdf');PHP 8.1+, PSR-18/PSR-17 — bring your own HTTP client, or use the bundled one. → Full PHP quickstart
go get github.com/labelzoom/labelzoom-sdk/goclient, err := labelzoom.New() // reads LABELZOOM_API_KEY; anonymous if unsetif err != nil { log.Fatal(err)}
result, err := client.Convert(context.Background(), labelzoom.ConvertRequest{ From: labelzoom.SourceZPL, To: labelzoom.TargetPDF, Body: []byte("^XA^FO50,50^ADN,36,20^FDLabelZoom^FS^XZ"), Options: &labelzoom.Options{ Label: &labelzoom.LabelSize{Width: labelzoom.Ptr(4.0), Height: labelzoom.Ptr(6.0)}, DPI: labelzoom.Ptr(203), },})if err != nil { log.Fatal(err)}
err = result.Save("label.pdf")Go 1.23+, zero dependencies. Functional options and a request struct rather than a chain — a fluent chain in Go has to panic or defer its errors. → Full Go quickstart
gem install labelzoomrequire "labelzoom"
client = LabelZoom::Client.new # reads LABELZOOM_API_KEY; anonymous if unset
result = client.convert( :zpl, :pdf, "^XA^FO50,50^ADN,36,20^FDLabelZoom^FS^XZ", label: { width: 4, height: 6 }, # inches dpi: 203)
result.save("label.pdf")Ruby 3.1+, no runtime dependencies. Keyword arguments with nested hashes. → Full Ruby quickstart
cargo add labelzoomuse labelzoom::{ConversionOptions, ConvertRequest, LabelZoomClient, SourceFormat, TargetFormat};
let client = LabelZoomClient::new(); // reads LABELZOOM_API_KEY; anonymous if unset
let result = client.convert( &ConvertRequest::new( SourceFormat::Zpl, TargetFormat::Pdf, "^XA^FO50,50^ADN,36,20^FDLabelZoom^FS^XZ", ) .options(ConversionOptions::new().label_size(4.0, 6.0).dpi(203)),)?;
result.save("label.pdf")?;Rust 1.85+, blocking, rustls — no async runtime to adopt. → Full Rust quickstart
Open label.pdf — you’ll see the label exactly as a Zebra printer would print it.
Why the SDK
Section titled “Why the SDK”Each SDK is a thin, dependency-light wrapper over the REST endpoint below. What it adds:
- Source and target formats are distinct types.
JPGandURLare source-only —JPGnormalizes toJPEG, andURLis a fetch instruction, not an output — sotoUrl()doesn’t exist. A compile error instead of a runtime 404. - Options are named, not hand-built query strings —
withLabelSize(4, 6)rather than remembering thatlabel.widthis inches whiledpiis dots per inch. - Typed errors per status code, instead of branching on integers.
- The API key is picked up from
LABELZOOM_API_KEYif you don’t pass one.
All eight are validated against a single shared conformance suite — 83 language-neutral fixtures every SDK must pass, plus an assertion that each suite really ran all of them — so the wire behaviour is identical across languages.
Working in a language without an SDK? The API is a plain HTTP call; see Calling the REST API directly below.
Get an API key
Section titled “Get an API key”- Create a free LabelZoom account.
- Open your dashboard and copy your API key.
The free tier converts unlimited labels with a watermark; paid plans remove it and add SLAs.
An API key is optional — every SDK works anonymously on the free tier, which is why the
examples above run as-is. Set LABELZOOM_API_KEY in the environment and the SDK picks it up
with no code change. See Authentication for details.
Calling the REST API directly
Section titled “Calling the REST API directly”The SDKs are a convenience, not a requirement — the API is plain HTTP, and no SDK is needed for
a language that doesn’t have one yet. The same conversion as one curl command:
curl -X POST "https://api.labelzoom.com/api/v2/convert/zpl/to/pdf" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: text/plain" \ -d '^XA^FO50,50^ADN,36,20^FDLabelZoom^FS^XZ' \ --output label.pdfEvery language quickstart shows the raw-HTTP form alongside the SDK form.
The conversion endpoint
Section titled “The conversion endpoint”Every conversion uses the same pattern:
POST https://api.labelzoom.com/api/v2/convert/{source}/to/{target}| Supported values | |
|---|---|
| Source formats | zpl, epl, ipl, tspl, dpl, sbpl, pdf, png, bmp, gif, jpg/jpeg, xml, json, url |
| Target formats | pdf, png, bmp, gif, jpeg, zpl, epl, ipl, tspl, dpl, sbpl, xml, json |
Send the label code (Content-Type: text/plain) or file bytes as the request body; the response body is the converted file.
See Supported formats for the content type each format needs, how to convert straight from a URL, and which conversion pairs require a paid plan.
Query parameters
Section titled “Query parameters”| Parameter | SDK equivalent | Meaning | Default |
|---|---|---|---|
label.width |
withLabelSize(w, h) / label_width |
Label width in inches | 4 |
label.height |
withLabelSize(w, h) / label_height |
Label height in inches | 6 |
dpi |
withDpi(n) / dpi |
Print density: 152, 203, 300, or 600 |
203 |
Example — a 4×6 inch label at 300 dpi:
POST /api/v2/convert/zpl/to/png?label.width=4&label.height=6&dpi=300Many more parameters are available — rotation, scaling, color mode, variable-data filling, and PDF/ZPL options. See Conversion parameters for the full list; each has a matching SDK option.
Next steps
Section titled “Next steps”- Language quickstarts: JavaScript, Python, Java, C#, PHP, Go, Ruby, Rust
- Supported formats — every source/target format, content types, and URL input
- Conversion parameters — the full
paramsreference - Authentication and key management
- Full interactive reference: Swagger UI
- No code needed? Use the free web converter.