This is a local Node.js bridge that allows web applications to print HTML content directly to thermal printers (58mm/80mm) without showing a print dialog. It uses Puppeteer to generate high-quality PDFs and pdf-to-printer to communicate with the hardware.
You can download the compiled Windows background service installer directly:
If you are developing a Node.js/web application, you can use the pre-built integration package to connect to this bridge easily:
- Request: Your POS application (Frontend) sends a POST request with HTML content to the bridge.
- Rendering: The bridge opens a hidden Chrome browser (via Puppeteer) and renders the HTML.
- Generation: It generates a pixel-perfect PDF tailored to the specific width (e.g., 58mm).
- Printing: The PDF is sent directly to the specified local printer driver.
- Cleanup: Temporary files and browser tabs are automatically cleared to save RAM.
- Port:
8080(HTTPS) - Base URL:
https://localhost:8080 - Content-Type:
application/json
Tip
Avoid Security Warnings: To bypass the "Not Secure" warning in Chrome/Edge permanently, enable this flag:
chrome://flags/#allow-insecure-localhost
Use this to fetch the exact names of the printers installed on the system.
- Endpoint:
GET /printers - Response:
{
"success": true,
"printers": [
"XP-58",
"Kitchen_Printer"
]
}Submits an HTML string to render silently in the background and prints to the specified printer device name. Supports customized 58mm and 80mm layouts.
- Endpoint:
POST /print(also acceptsPOST /print-html) - Payload Parameters:
html(Required): HTML string content to be printed.printerName(Required): Exact printer device name.width(Optional):"58mm"|"80mm"(Default:"80mm").waitUntil(Optional): Puppeteer wait condition (e.g."load","networkidle0", Default:"networkidle0").
- Request Example:
{
"html": "<h1>Receipt Title</h1><p>Item 1: $10.00</p>",
"printerName": "XP-58",
"width": "58mm"
}- Response:
{
"success": true,
"message": "Sent to XP-58 spooler"
}