Print labels on a Brother QL-820NWB
The QL-820NWB can sit on Wi-Fi, but PrintBase still prints the OS queue, not AirPrint from the cloud. Send a PDF at the DK size.
For Shops using a QL-820NWB on the network
Overview
The QL-820NWB adds Wi-Fi, Ethernet, and Bluetooth to the QL-800's USB label printing. AirPrint and Brother's mobile apps are separate. For this API, install the printer on a computer that runs the agent, using Brother's driver, and send a PDF sized to the DK roll.
PrintBase does not ship a driver for this model. The agent prints to a queue the operating system already lists. Raw bytes go straight through: from memory into the Windows spooler, or via lp -o raw on macOS and Linux. PDF jobs go through the OS driver. A PDF marked as raw is rejected with INVALID_CONTENT.
A Wi-Fi printer is still not reachable from your cloud server just because it has an IP. The agent PC on that LAN holds the queue. Do not port-forward the printer.
Integration steps
- 01
Install the printer in the OS
Use the vendor driver or a raw port until a test page works. The agent cannot see a device the operating system does not list.
- 02
Read the numeric code
GET /v1/printers returns code. That integer is printer_code on POST /v1/print-jobs. The name is for humans.
- 03
Match content_type to the payload
ZPL, EPL, TSPL, and ESC/POS are content_type raw, standard base64. Office documents and driver labels are content_type pdf.
- 04
Key the job to the business id
Reuse one Idempotency-Key per label. A reprint uses a new key. The same key with a different body returns HTTP 409.
- 05
Wait for completed
HTTP 201 means status queued. Poll GET /v1/print-jobs/{id}. Paid plans can subscribe to print_job.completed and print_job.failed only.
Node.js
// DK-sized PDF for a QL-820NWB
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: labelPdf.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
Model notes
A Wi-Fi printer is still not reachable from your cloud server just because it has an IP. The agent PC on that LAN holds the queue. Do not port-forward the printer.
Raw versus PDF on this queue
Raw is not reflowed. On Windows a PDF needs an application that handles PrintTo; the agent error text names Adobe Reader or SumatraPDF as examples. macOS and Linux use lp.
Questions
Can the cloud print via AirPrint?
No. AirPrint is local. Use the OS driver queue and the agent.
Does Wi-Fi remove the need for a computer?
No. Something on the LAN must run the agent and expose a queue.
Same PDF as the QL-800?
Yes if the die matches. The command path is the driver, not a different language.
Bluetooth from a phone?
Not through this API. The phone would be a different integration. The agent uses the desktop queue.
Free plan: 100 jobs a month on one computer, no card.