Project: A Browser Tool That Reformats Tax Invoices — No Server Needed
Sometimes a client or authority wants an invoice presented differently. In my case, invoices showing a “Deduction” line needed to be reissued in “(Less) Retention” format — same numbers, different presentation. Doing this by editing PDFs manually is slow and error-prone, and uploading financial documents to random online converters is a privacy risk I wasn’t willing to take. So the solution had one hard requirement: the documents must never leave the computer.
The approach: everything in the browser
The tool is a single HTML file. Open it in any browser, drop the invoice PDF onto the page, and two JavaScript libraries do the work locally: PDF.js (Mozilla’s library) renders the original invoice onto a canvas, the relevant section is redrawn in the new retention format, and jsPDF exports the finished document as a fresh PDF. No installation, no server, no upload — it works the same on any office PC, and IT has nothing to maintain.
The unexpected hard part: print quality
Getting a working prototype took an evening. Getting professional output took several more. Canvas rendering that looks fine on screen can print blurry, and text that fits at one size overflows at another. The fixes came iteratively: rendering at higher resolution before export, and scaling fonts based on the actual content length rather than fixed sizes. If you build document tools, budget more time for output polish than for core logic — the last 10% of visual quality is half the project.
Why this pattern is worth stealing
The “single HTML file” pattern deserves more attention in office environments. It needs no admin rights to run, no hosting, no subscription, and — critically for finance work — it’s private by construction, because the data physically stays on the machine. For any small document transformation your team does repeatedly, ask an AI assistant to build you one of these. Describe the input, describe the desired output, iterate on the details, and you end up with a tool that would have been a purchased product a few years ago.
Same numbers, new format, zero risk of transcription errors — and the original never leaves the desk.
