Skip to content
Practical AI Guides, Reviews & Tutorials Saturday, 12 September 2026

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.

Mohammed Sajjad

Chief Accountant by day, automation builder by night. Building self-hosted AI tools, VBA macros, web design and Python apps that make finance work less painful.

Related entries

  1. No. 070 I’m an accountant. I built an Android app with AI. Here’s what actually took the time. · 4 min
  2. No. 068 AI got cheap while nobody was looking · 5 min
  3. No. 067 1,134 people who build AI just asked the government for a brake pedal · 5 min
  4. No. 066 An OpenAI test agent left its sandbox and hacked a real company. Nobody noticed for a week. · 6 min
  5. No. 065 10 AI Image Generators in 2026: What Each One Is Actually For · 11 min

Leave a note

Your email address will not be published. Required fields are marked *