Create a pairing code
An administrator creates a one-time pairing code. It expires after ten minutes.
Print agent
A small service that runs next to your printers, dials out to your API server and writes each job to the printer beside it. This page is about the agent itself: where it runs, how it pairs and connects, what it does with a job, and what happens when it is offline or revoked.
Your infrastructureYou run the agent. BarcoderX hosts nothing for you: the agent, your API server and your printers all sit on infrastructure you operate, and no label data is sent to BarcoderX.
The agent starts every connection. Nothing connects in to it, so the printer network needs no inbound port. The diagram follows the agent from the day it is paired to a job reaching a printer.
Put an agent on a machine at each site that can reach that site's printers: beside them, on their network. It makes outbound connections only, so the machine needs outbound HTTPS to your API server and no inbound port. Which route it uses to a printer depends on the operating system it runs on.
| Platform | Runs as | Reaches printers by | Color and non-thermal printers |
|---|---|---|---|
| Windows | A Windows service, on Windows 10, Windows 11 or Windows Server 2019 or later. | TCP port 9100, or the Windows spooler (RAW). | Raster pages, drawn through GDI from the same layout. |
| Linux | A systemd daemon, on x64 or arm64. | TCP port 9100, CUPS, or USB as a raw device. | PDF, drawn through CUPS from the same layout. |
The agent is one half of the queued route; the other half is the API server that holds the queue, which you also run. How that route compares with printing directly, through a printer maker's cloud or through the spooler is on Server-side label printing for .NET, and this page does not repeat it.
Labels printed at a desk, such as event wristbands and badges, or at a draw station, such as specimen labels, can use this route.
An administrator creates a one-time pairing code. It expires after ten minutes.
You run the agent where the printer is, and enter the code. The agent enrolls with your API server, creates its own key pair on the machine and sends only the public half. The private key stays on the machine.
The agent lists the local print queues and ports it can see. You choose the ones to register, each with its printer language and its profile.
After pairing, the agent authenticates with signed assertions, and its access tokens are short-lived and bound to the agent and to the tenant.
The job's life stays visible on your API server while this happens:
The agent's logs never contain label content.
How it works: status and the life of a job API: retries and errors Native or raster printing Use cases
Jobs for an agent that is not there do not fail at once, and they do not print twice when it comes back.
| Situation | What happens |
|---|---|
| A job is queued while the agent is offline | It waits in the queue no longer than its expiry, which each tenant can set. When the agent reconnects, it picks up pending work. |
| The job reaches its expiry first | A job can end as Expired. Decide how long a job is worth keeping: a pick label for yesterday's orders should not print this morning. |
| The agent is lost before it acknowledges a job | The job goes back to Queued. |
| A job is delivered twice | Delivery is at-least-once, so this can happen after a dropped connection. The agent de-duplicates by job id, so the label prints once. |
| Your code retries a request that timed out | Print jobs honor an idempotency key, so a retried request does not queue a second label. |
A built-in diagnostic command checks connectivity, proxy, clock skew, enrollment and printer reachability, in Spanish or English. This is the shape of its output, illustrative only.
Connectivity ........ OK Proxy ............... none Clock skew .......... 0.3 s Enrollment .......... paired Printer 192.168.1.50:9100 ... reachable
Illustrative output. Wording and format are not final.
Keep reading
Server-side label printing for .NET: four architectures compared Print thermal labels from a web app: four ways How it works: reaching the printer Security: the print agent Platform: the print agentSources Everything this page says about BarcoderX comes from its published platform, printing, security, API, how-it-works and FAQ pages and its server-side and web-app printing guides.
Written by BarcoderX in its own words.