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.
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: '热敏打印机', copies: 1 }
);
width/height (e.g. 80mm), not A4html, body { margin:0; padding:0; } in HTMLprintOptions.printerName from client enumerationbatchPrint—see print options guideUsually 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—configure remote WebSocket/HTTP on the client. See the remote print guide.
Supported—official macOS dmg and Linux deb (Kylin/UOS) use the same printHtml API as Windows.
The same web-print-pdf front-end runs on Windows, macOS, and Linux/domestic OS—install the matching client on each desktop.