Thermal receipts & shipping label silent print

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.

Typical scenarios

80mm receipt

Food & retail thermal tickets

Set pdfOptions width (e.g. 80mm), zero html/body margins to avoid extra pages. See the 80mm demo.

Shipping labels

WMS waybills / parcel labels

Push HTML or URLs from OMS; warehouse PCs batch silent-print. Pair with remote print. See batch labels demo.

Mixed fleet

Windows front + domestic OS back office

Same npm package: Windows exe and Kylin/UOS deb clients share the API—one print stack to maintain.

Integration steps

  1. Install the Web Print Expert client on POS/warehouse PCs
  2. npm install web-print-pdf
  3. Author HTML/CSS for paper width (zero margins on thermal)
  4. Call printHtml or batchPrint with printOptions.printerName
  5. High volume: enable remote WebSocket/HTTP push

80mm receipt parameter sketch

await webPrintPdf.printHtml(
  receiptHtml,
  { width: '80mm', height: '120mm', printBackground: true },
  { printerName: '热敏打印机', copies: 1 }
);

Parameter checklist

  • Width: pdfOptions width/height (e.g. 80mm), not A4
  • Margins: html, body { margin:0; padding:0; } in HTML
  • Printer: printOptions.printerName from client enumeration
  • Batch: peak label volume via batchPrint—see print options guide

FAQ

Blank pages or extra pages on thermal paper?

Usually default body margins or oversized paper height. Follow the 80mm demo—zero margins and match pdfOptions to physical width.

Silent print labels without a browser dialog?

Yes with web-print-pdf + local client. window.print always shows a dialog.

ERP pushes jobs; warehouse auto-prints?

Yes—configure remote WebSocket/HTTP on the client. See the remote print guide.

Mac stores or domestic Linux terminals?

Supported—official macOS dmg and Linux deb (Kylin/UOS) use the same printHtml API as Windows.

Client deployment by platform

The same web-print-pdf front-end runs on Windows, macOS, and Linux/domestic OS—install the matching client on each desktop.

Download client — free trial View npm package Documentation