Zebra Browser Print alternative: send ZPL from your server
Zebra Browser Print is a localhost helper that sends ZPL from a web page on ports 9100 and 9101. A server-side app can send the same ZPL through the print API instead.
For Apps that outgrew a browser-to-localhost Zebra bridge
Overview
Zebra's Browser Print user guide describes a desktop helper so a web page can print ZPL to a USB or network Zebra. The guide says it uses ports 9100 and 9101, speaks ZPL II, and cannot run while another program holds those ports. The sample page has to be served from a web server, not opened as a local file.
That design needs the browser and the printer on the same machine, and it only targets the Zebra models the guide lists. PrintBase takes ZPL from your server as content_type raw and the agent writes it to whatever OS queue you named, including a Zebra, without the page calling localhost.
If your page is an internal tool on the packing PC and you only have Zebras, Browser Print may still be enough. If the order is created in the cloud, the localhost bridge is the wrong hop.
Integration steps
- 01
Install the agent where the printer is
The computer that can already print a test page runs the agent. GET /v1/printers and note the code.
- 02
Keep the API key on a server
Authorization: Bearer. Do not put the key in a browser, a theme, or a public automation log.
- 03
POST the document
content_type pdf or raw, exactly one of content or content_url, plus printer_code.
- 04
Use a stable Idempotency-Key
Retries reuse the key and the body. A reprint uses a new key. A mismatch returns HTTP 409.
Node.js
// ZPL that used to be handed to Browser Print
const res = await fetch('https://api.printbase.cloud/v1/print-jobs', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.PRINTBASE_API_KEY}`,
'Content-Type': 'application/json',
'Idempotency-Key': idempotencyKey,
},
body: JSON.stringify({
printer_code: Number(process.env.PRINTER_CODE),
content_type: 'raw',
content: Buffer.from(payload).toString('base64'),
copies: 1,
}),
});
if (!res.ok) throw new Error(`PrintBase ${res.status}: ${await res.text()}`);
const job = await res.json();
// { id: "job_abc", status: "queued" }
Details for this setup
Ports
The user guide says Browser Print cannot run when another program uses 9100 or 9101. The PrintBase agent does not bind those ports.
Model list
Zebra's guide lists support for specific Link-OS printers and ZPL II. PrintBase does not use that list. It prints the OS queue, so a non-Zebra raw printer is a separate question of command language.
Questions
Do I uninstall Browser Print?
Only if you no longer want the page to call it. The agent can print the same Zebra through the driver queue.
HTTPS certificate errors on port 9101?
That is Browser Print's local certificate. See the troubleshooting page. It is not a PrintBase error.
Can I send the same ZPL?
Yes, as raw base64. Fix dpi and ^PW for the head. The API does not rewrite your layout except for the documented ^PQ copy folding.
Non-Zebra printers on the same page?
Browser Print will not drive them. The agent will, if the OS lists them and you send a payload that printer understands.
Free plan: 100 jobs a month on one computer, no card.