Food & retail thermal tickets
Set pdfOptions width (e.g. 80mm), zero html/body margins to avoid extra pages. See the 80mm demo.
Retail receipts, 80mm thermal tickets, and WMS shipping labels usually need silent output to a named thermal printer—no browser dialog. Describe layouts in HTML/CSS, then printHtml / batchPrint via web-print-pdf on Windows POS, Mac store PCs, and Linux/domestic warehouse desktops with one codebase.
Describe paper in HTML/CSS. Local: browser printHtml / batchPrint. Remote peak: no npm—enqueue the same JSON on your server; desk client enters the consumer API URL (remote print, WMS push).
Set pdfOptions width (e.g. 80mm), zero html/body margins to avoid extra pages. See the 80mm demo.
Push HTML or URLs from OMS; warehouse PCs batch silent-print. Pair with remote print. See batch labels demo.
Same npm package: Windows exe and Kylin/UOS deb clients share the API—one print stack to maintain.
npm install web-print-pdfprintHtml or batchPrint with printOptions.printerNameawait webPrintPdf.printHtml(
receiptHtml,
{ width: '80mm', height: '120mm', printBackground: true },
{ printerName: 'Thermal printer', copies: 1 }
);
width/height (e.g. 80mm), not A4html, body { margin:0; padding:0; } in HTMLprintOptions.printerName from client enumerationbatchPrint—see print options guide| Paper | pdfOptions | Typical use |
|---|---|---|
| 80mm receipt | width: 80mm, margin:0 | Food & retail POS |
| 100×150 label | Exact width/height, zero margins | Shipping, WMS |
| A4 report | paperFormat: A4 | See print options |
printerName to client listUsually default body margins or oversized paper height. Follow the 80mm demo—zero margins and match pdfOptions to physical width.
Yes with web-print-pdf + local client. window.print always shows a dialog.
Yes—maintain jobs on your server, expose WebSocket/HTTP, and configure that URL on the desk client—not printHtml in a browser. See the remote print guide.
Supported—official macOS dmg and Linux deb (Kylin/UOS) use the same printHtml API as Windows.
Many shipping labels suit HTML PoC; precision overlays can stay on Lodop in parallel. See parallel Lodop guide.
The same web-print-pdf front-end runs on Windows, macOS, and Linux/domestic OS—install the matching client on each desktop.