Skip to content
Practical AI Guides, Reviews & Tutorials

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.

Recent entries

  1. No. 075 How I Use AI as a Chief Accountant: 5 Workflows That Save Me Hours · 3 min
  2. No. 074 Arshara Finance is Now Live on Google Play · 2 min
  3. No. 073 This week in AI: OpenAI’s Astra arrives, an AI escaped its sandbox in a safety test, and Amazon says agents will cut jobs · 5 min
  4. No. 072 This week in AI: Nvidia buys Hugging Face for $12.9 billion, NYC bans AI in classrooms, and a very bad outage day · 5 min
  5. No. 071 This week in AI: agents that book your hotel, 2 million more GPUs, and a $299 robot brain · 3 min

Leave a note

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