Print ZPL or EPL to a Zebra GK420d
The GK420d is an older direct-thermal desktop. Send the language it is set to, usually ZPL, as raw. Confirm dpi before you fix coordinates.
For Teams still shipping on a GK420d
Overview
The GK420d is a direct-thermal desktop, commonly 203 dpi, and it can be set to ZPL or EPL depending on how it was configured. PrintBase does not switch that mode. Print a configuration label from the printer buttons and match content_type raw to the language shown there.
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.
There is no ribbon on a GK420d. Dark labels mean the darkness setting or the media, not a transfer ribbon. If the queue name contains ZDesigner, raw spooling is still the right path for ZPL; do not also run Zebra Browser Print on ports 9100 and 9101 if you need those ports for something else.
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
// GK420d label in the language the printer is set to
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(zpl,'utf8').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
There is no ribbon on a GK420d. Dark labels mean the darkness setting or the media, not a transfer ribbon. If the queue name contains ZDesigner, raw spooling is still the right path for ZPL; do not also run Zebra Browser Print on ports 9100 and 9101 if you need those ports for something else.
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
ZPL or EPL? in this setup
Whichever the configuration label says. Sending the other language prints garbage or a blank gap.
Is 203 dpi guaranteed?
It is the common head, not a promise for every used unit. Read the label.
Can I keep using the old Zebra utilities?
Yes for setup. The print path here is the OS queue plus the agent, not Browser Print.
The labels drift after a few dozen.
Calibrate the media sensor on the printer. The API does not send a calibrate command unless you put it in the ZPL.
Free plan: 100 jobs a month on one computer, no card.