PrintBase versus QZ Tray
QZ Tray signs requests in the browser and prints on that PC. PrintBase accepts the job on a server and prints through an outbound agent. Neither replaces the other in every layout.
For Developers comparing browser signing with a cloud print API
Overview
QZ Tray runs on the user's computer. Your page loads QZ and, for silent printing, signs each request with a certificate. QZ's FAQ says the software is free and the certificate is how you suppress dialogs. Their site lists that certificate inside Premium Support at $749 USD.
PrintBase never sees the page. A backend you trust holds the API key and posts a PDF or raw payload. The agent maintains an outbound WebSocket. The printer does not need a public IP. There is no signature step in the browser.
Choose QZ when a kiosk page and the printer share a PC and you want the page to print locally. Choose the API when many browsers, or no browser at all, must print on a printer in a shop.
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
// Job posted by the server, not by the page
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: 'pdf',
content: pdf.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
Security model
QZ's risk is a local service the browser can reach. PrintBase's risk is an API key on a server. Protect that key. Do not move it into the page to 'simplify'.
Status
PrintBase returns a job id and a status machine. A local tray's dialog is a different kind of confirmation. Do not describe them as the same event.
Questions
Can I use both?
Yes, on different stations. Do not send one job through both and expect deduplication.
Does PrintBase remove the need for any install?
No. The agent is the install. It replaces the tray plus the certificate, not the need for software next to the printer.
What about PrintNode in this comparison?
PrintNode is in the same category as PrintBase: a cloud API plus a client. QZ is the browser-bridge category. See the PrintNode pages for that pair.
Invalid signature errors?
Those are QZ's signing flow. They do not occur on POST /v1/print-jobs. See the troubleshooting page if you are debugging QZ itself.
Free plan: 100 jobs a month on one computer, no card.