RECEIPT PRINTER — WEBUSB EDITION (no bridge, no background app) ================================================================== WHAT CHANGED FROM THE OLD VERSION ---------------------------------- The old setup needed a Python script (print_bridge.py) running in the background every time you wanted to print. This version removes that entirely. The webpage now talks straight to the printer over USB using your browser's built-in WebUSB feature. Nothing to start, no black window to leave open. Trade-off: Windows normally "owns" a USB printer through its own printer driver, and that lock has to be handed to the browser instead. That's a ONE-TIME step below using a small free tool called Zadig. After this one step, this printer will only be usable through this webpage (Chrome/Edge) — it will disappear from your normal Windows printer list. If you need to print to it from other programs too, keep the printer's original driver and don't do this step for that device (or use a second identical printer). Only works in Chrome or Edge on desktop. Firefox and Safari do not support WebUSB. ONE-TIME SETUP (only needed once, ever, per printer + PC) ----------------------------------------------------------- 1. Plug in the receipt printer and make sure Windows has already installed it normally (so you know it works). 2. Download Zadig (free, no install — just an .exe you run): https://zadig.akeo.ie/ 3. Run Zadig. Turn on "Options -> List All Devices" so your printer shows up (it may not be listed by default). 4. In the dropdown, find your receipt printer. Common names include the printer's model number, or something generic like "USB Printing Support" — if unsure, unplug the printer, refresh the list, plug it back in, and see which entry appears/disappears. 5. On the right side, next to the green arrow, make sure the target driver is set to "WinUSB". Click "Replace Driver" (or "Install Driver"). 6. Wait for it to finish, then close Zadig. That's it — this step never needs to be repeated for this printer on this PC. EVERY TIME YOU WANT TO PRINT A RECEIPT ----------------------------------------- 1. Double-click "receipt-printer.html" to open it in Chrome or Edge. 2. Click "Connect Printer (USB)" — pick your printer from the browser's device picker. Your browser will remember it for next time, so this is normally a one-click, one-time-per-browser-profile step too. 3. Click the upload box and choose your receipt PDF. Fields fill in automatically. 4. Click "Print with Printer's Native Font". Done! IF SOMETHING GOES WRONG -------------------------- - "This browser doesn't support WebUSB": switch to Chrome or Edge. - Printer doesn't appear in the device picker: re-check the Zadig step — the driver must be WinUSB, and "List All Devices" must have been on when you found it. - "No printable (bulk OUT) endpoint found": you may have picked the wrong USB entry in Zadig (some printers show multiple entries — try the other one) or the printer isn't a supported ESC/POS model. - Printer stopped working with other Windows programs: expected — see the trade-off note above. Re-run Windows's normal driver install for that printer (via Devices & Printers) to restore normal printing, which will undo the WebUSB access. Keep this file and receipt-printer.html together.