Print kitchen tickets on an Epson TM-m30
The TM-m30 is a compact 80 mm Epson. Send ESC/POS for a kitchen ticket, or PDF through the driver. Pick the interface the OS queue uses.
For Kitchens and counters using a TM-m30
Overview
The TM-m30 family is a compact 80 mm Epson used on counters and in kitchens. USB, Ethernet, Bluetooth, and Wi-Fi exist across the m30 and m30II variants. PrintBase does not select the radio. It prints the queue you installed.
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.
Kitchen tickets should be ESC/POS with a large order number and a cut. If the ticket is coming from a PDF generator, send pdf and accept that the driver, not GS V, decides the cut.
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
// TM-m30 kitchen ticket
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(ticket).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
Kitchen tickets should be ESC/POS with a large order number and a cut. If the ticket is coming from a PDF generator, send pdf and accept that the driver, not GS V, decides the cut.
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
Which TM-m30 variant?
Any that appears as an OS printer. Bluetooth pairing is done in the OS, not in the API.
Can the tablet print by itself?
A tablet is not the agent. The agent is a Windows, macOS, or Linux process.
58 mm mode? in this setup
Some configurations use a narrower printable width. Count columns from a test receipt, not from the model name.
Orders from a website?
Your ordering server posts the ticket. The customer's phone does not.
Free plan: 100 jobs a month on one computer, no card.