Printing and export

Thermal printing, in the printer's language.

BarcoderX reads each printer's profile, then emits native commands where it can and raster where it must. The same layout also exports to six file formats, and prints from your own process or through the print agent.

  • ZPL + EPLAt 1.0. Four more printer languages are planned.
  • 6 exportsPDF, PNG, JPG, SVG, PCX and HTML.
  • Direct or agentPrint from your own process, or through the print agent on a LAN.
  • DeterministicThe same input gives the same bytes on every supported platform.

01 Printer languages and exports

Speak the printer's language. Or ship a file.

Two printer languages at 1.0, six export formats, all read from one layout.

Printer languages

  • ZPLNative text, barcodes, shapes and graphics, plus RFID encoding.1.0
  • EPLNative lines, boxes and barcodes. The rest is rasterized.1.0
  • ESC/POSReceipt and label printers.Planned
  • Honeywell FingerprintHoneywell industrial printers.Planned
  • Direct ProtocolDirect-protocol printers.Planned
  • HP PCLOffice and color laser printers.Planned

Planned languages arrive in phase 2 as plug-ins, with no change to the engine, the template format or the API.

ZPL reference: guides and one page per command

Printer languages: ZPL and EPL for developers

Export formats

  • .PDFVector, searchable text, subset fonts embedded.
  • .PNGRGBA, gray or 1bpp, at the DPI you ask for.
  • .JPGBaseline, with a quality setting.
  • .SVGPaths and images only. No scripts.
  • .PCX1bpp, run-length encoded.
  • .HTMLOne file, no scripts, strict content policy.

Many labels at once come out as one multi-page PDF, or as a ZIP of files. Output is deterministic: the same input gives the same bytes.

ZPL and EPL compared

How the ZPL and EPL printer languages differ
AspectZPLEPL
StructureFormats between ^XA and ^XZ, with caret and tilde commands.Line commands, from N to P.
TextScalable font, UTF-8 selectable.Five fixed bitmap fonts with multipliers, code pages only.
Native barcodesBroad, including DataBar, Data Matrix, QR, PDF417, MaxiCode and Aztec.A narrower linear set. Two-dimensional support depends on the model.
GraphicsGraphic field in ASCII hex, compressed ASCII or Z64.Binary raster graphic.
RFIDYes, with EPC encoding.No.
In practiceMore of the label goes out as native commands.Mostly raster graphics, with native barcodes and shapes. Text outside the selected code page is always raster.

02 Native or raster

Native where it can. Raster where it must.

For every element on the label, the engine asks the printer's profile how it can be drawn, then lands on one of four outcomes.

  1. 01

    Native

    The printer draws it with its own command. Only when the profile marks the command equal to the preview, and, for barcodes, a lab scan agrees.

  2. 02

    Native, approximate

    Text in a printer-resident font. The preview shows a substitute, and the editor flags the element with a badge.

  3. 03

    Raster

    The engine draws the dots at the printer's resolution and sends them as a graphic. This is what keeps the print identical to the preview.

  4. 04

    Unsupported

    Neither is possible. The job is rejected with a diagnostic, instead of printing something different.

Two render intents

  • Fidelity is the default: the print looks like the preview, and native commands are used only where proven equal.
  • Native preferred favors printer-side commands where they exist.
  • An output hint on each element can ask for Auto, Native or Graphic.

Printer profiles

  • Generic profiles are built in: ZPL at 203, 300 and 600 dpi, and EPL at 203 and 300 dpi.
  • A profile records the dpi, print width, memory, features such as UTF-8, RFID and cutter, resident fonts, and which native barcodes are equivalent.
  • Model-specific profiles come from lab measurements. Tenants can derive custom profiles from a built-in one.

Big jobs stay light

When a job has many labels, static content is stored on the printer once and recalled for each label, then deleted at the end of the job by default.

Color and non-thermal printers

They print through graphic mode: raster pages to Windows agents and PDF to Linux agents, drawn through GDI or CUPS from the same layout.

Native or raster printing explained: what each costs and how BarcoderX chooses

03 Transports and status

Reach the printer, and hear back.

Print straight from your own process, or through the print agent. Where the transport allows it, BarcoderX reads the printer's status too.

Printer transports, the platforms they run on and the status they can report
TransportPlatformPrinter status
TCP, port 9100Windows, LinuxFull query and response
SerialWindows, LinuxFull query and response
Windows spooler, RAWWindowsQueue and job state only
CUPSLinuxQueue and job state only
USB, raw deviceLinuxFull query and response
GDI page printing, for graphic modeWindowsQueue and job state only
PrintHTTP
// Queue a job for the print agent (paths relative to /api/v1):
POST /print-jobs
GET  /print-jobs/{id}

Illustrative only.

What the status tells you

On a two-way transport the engine reads the printer's own status: paper out, pause, head open, ribbon out, over or under temperature, buffer full and labels remaining, plus RFID results. Spooler and CUPS report queue state only, and the API says so.

What it deliberately does not do

The API server never opens a connection to a printer address you supply, and the browser never calls a port on your machine. Printers behind a firewall are reached by the print agent, which only dials out.

04 Print agent

From a queued job to a LAN printer, with no inbound port.

For server-side printing, the catch is that your API server is often on a different network from the printers, and nothing can reach in without an inbound port. The agent reaches out instead: it holds a connection open to your API server and prints whatever arrives, on Windows or Linux.

Your server or cloud

API server

API, job queue and audit log.

Your network · no inbound port

Print agent

Windows or Linux

Service or systemd daemon.

Printer

ZPL or EPL

TCP, spooler, CUPS or USB.

One job, one visible lifecycle

  1. Queued
  2. Dispatched
  3. Received
  4. Spooled
  5. Printed

Or ends asFailedCanceledExpired

A job for an agent that is offline waits in the queue until its expiry, which each tenant can set. If the agent is lost before it acknowledges, the job goes back to Queued.

  • Pairing, not passwords

    A one-time code enrolls the agent. It then creates its own key pair on the machine, and only the public half is sent.

  • Signed jobs

    The server signs every job. The agent checks the signature before anything reaches a printer.

  • No double prints

    Delivery is at-least-once and the agent de-duplicates by job id, so a dropped connection never prints a label twice.

  • Revoke in seconds

    Revoking an agent closes its live connection and refuses its tokens straight away.

Server-side label printing for .NET

The print agent: pairing, connection and jobs

05 Web apps

Printing from a web app

From a web app, the browser never calls a port on your machine: the app sends the job to the server, and the print agent on your network delivers it. Four ways to do it, compared.

Print thermal labels from a web app: four ways

Next step

Tell us your printers.

Tell us which printers, printer languages and volumes you work with.