BillBook Printer Helper v0.3
A lightweight background utility that connects your browser directly to thermal receipt and standard desktop printers. Prints bills instantly without browser print dialogues.
Windows Security Warning Guide (SmartScreen Bypass)
Because the BillBook Printer Helper is free and open-source, it does not yet have a commercial digital certificate ($400/year). Windows Defender may display a blue warning box saying "Windows protected your PC". Follow these simple steps to install:
1 Click "More Info"
When launching the installer, Windows Defender SmartScreen might block it. Simply click the "More info" link under the description text.
More info
2 Click "Run Anyway"
After clicking "More info", the publisher detail will be shown as "Unknown Publisher". Click the "Run anyway" button to launch the setup wizard.
Key Features
-
Instant Printing: Automatically routes your invoices straight to the selected thermal/USB printer without print popups.
-
System Tray Execution: Sits quietly in the background near the clock. Easy right-click exit and configuration.
-
Start with Windows: Option to run automatically when the computer boots up, so you never have to open it manually.
-
No Admin Privileges Required: Safe to run and install. Uses standard localhost bridge port 9100.
-
SumatraPDF Bundled: Built-in rendering engine for accurate PDF parsing and printing.
Setup Steps
Download and Install
Download the installer above and follow the Inno Setup wizard. Check "Start automatically with Windows" during install.
Verify Running Status
Look for the printer helper icon in your system tray (near the clock). A green dot indicates it is active and ready on Port 9100.
Configure in POS Settings
Open BillBook POS -> Settings -> Printers. Connect to local helper, select your thermal printer from the list, and turn on Direct Printing.
Developer API Integration Guide (v0.3)
Are you a developer looking to integrate direct silent printing into your own web applications? You can connect to the active BillBook Printer Helper locally via standard JavaScript fetch requests.
Security & Token Setup
Starting with v0.3, the helper only accepts requests from the local machine and requires a valid X-Print-Token header. The same token must be configured in both the helper and your server.
- Generate a strong random token and set
PRINTER_HELPER_TOKENin your server's.envfile. - Compile the helper with the same token in the
ExpectedPrintTokenconstant. - Expose the token to your frontend (e.g.
window.PRINT_TOKENorwindow.POS_CONFIG.print_token). - Send
'X-Print-Token': yourTokenin everyfetchtolocalhost:9100. - Add
http://localhost:9100to your CSPconnect-srcdirective.
The helper binds to the loopback interface only, so remote machines cannot connect even if port 9100 is reachable.
1. Fetch Connected Printers (GET `/printers`)
Retrieve a JSON array of all printers installed on the client's Windows machine:
fetch('http://localhost:9100/printers', {
headers: { 'X-Print-Token': (window.PRINT_TOKEN || '') }
})
.then(res => res.json())
.then(printers => {
console.log("Installed printers:", printers);
})
.catch(err => console.error("Helper is not running", err));
2. Direct Silent Printing (POST `/print`)
Send a print job directly to a specific printer without opening any browser dialogs. The body must be a JSON object containing the printer name and the absolute URL of the PDF:
fetch('http://localhost:9100/print', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-Print-Token': (window.PRINT_TOKEN || '')
},
body: JSON.stringify({
printer: 'XP-80', // Replace with the selected printer name
url: 'https://example.com/invoices/bill-101.pdf' // Absolute PDF URL
})
})
.then(res => res.json())
.then(data => {
if (data.status === 'success') {
console.log("Printed successfully!");
} else {
console.error("Print failed:", data.message);
}
})
.catch(err => console.error("Network error connecting to helper", err));
X-Print-Token before processing any request. If the token is missing or incorrect, the helper returns 403 Forbidden. When a new third-party domain makes a request, the existing origin-permission dialog may also appear on the user's desktop.