Super Intelligence Systems
Home/Notes/Invoice photos
Notes · 7 minute read

Your invoice photos never
leave the office.

A photographed supplier invoice can be read on the machine it was scanned on: no upload, no per-page fee, no API key. Here is how it stays accurate, and why a bad read is held instead of filed.

Cloud OCR is a decision, not a default

A property manager photographs a supplier invoice, sends it to a cloud reading service and gets the vendor, the date and the total back in a second. For a demonstration it is the obvious answer. For an office whose argument is that the paperwork stays inside it, it is a decision that nobody wrote down.

The invoice carries a supplier name, an address, a job number and sometimes banking details. Sending it to a service in another country is a privacy question before it is a technical one. Under PIPEDA the office is responsible for where that page went.

Then there is continuity. A per-page price turns a busy month into a bill, and the service can change its price, its terms or its owner. A workflow that depends on it stops when the account does. An office that already owns the scanner and the computer is paying twice for a job the machine on the desk can do.

The three questions worth asking

Where does the page go? If the answer is another company in another country, that is a decision to make deliberately, not a setting.

What happens when the account stops? A local pipeline keeps working when the internet does not, and the files stay where the work is.

Who handles the failures? Every reader gets some invoices wrong. The question is whether the error arrives as a flagged record or as a quietly filed number somebody finds at year end.

What accuracy looks like here

Accuracy is measurable, so we measure it. A printed invoice at 300 dpi is the easy case; a phone photo at 72 dpi is the hard one, and the design starts from the hard case: a straight, well-lit page with enough pixels reads cleanly, and a page that does not is refused rather than guessed.

The repository behind this site measures that on six synthetic supplier invoices with eight fields each. At 300 dpi it extracts 48 of 48 expected values exactly: vendor, invoice number, both dates, job or purchase order, subtotal, tax and total. Six synthetic invoices, eight fields each: that is the measured claim, and it is not a general accuracy promise.

A synthetic supplier invoice on paper, with a degraded copy of the same page behind it
The test set: the same page at 150 dpi (front) and 72 dpi (behind), the condition the reader refuses.

The number that matters is not the average. It is whether the tool knows when it is wrong. On a low-quality page it must refuse: the same invoice rendered at 72 dpi loses the subtotal line, and the record is held instead of filed. Upscaling does not recover detail the scanner never captured. It invents pixels, and the code records that it did.

The rule that makes a local pipeline safe

Reading is the easy half. The hard half is deciding which records a person should see.

Five checks run on every page. The arithmetic earns its place: subtotal plus tax has to equal the total, within two cents for rounding. A transposed digit, a missed line or a wrong tax rate almost always breaks that sum, and the break is the evidence.

python3 -m invoicecapture invoices/ --out out/

invoice-capture: 6 input(s), 3 filed, 3 held for review
  held  total_mismatch   323.00 + 41.99 = 364.99, printed total 366.99
  held  unreadable_date  invoice_date could not be parsed from 'INVOICE DATE see attached'
  held  duplicate        already filed: HALTON PROPERTY SERVICES / HPS-2026-0473

The other four are presence, a date that parses, confidence on every required field, and a duplicate check on vendor and invoice number. A held record is part of the output, not an error log: it sits in a queue with the rule that stopped it, and the CLI exits non-zero so a scheduled run cannot pretend everything was filed.

That queue is the honest shape of the product. The tool types the invoices that are clean, and tells a person exactly which ones are not, and why.

Where it fits

Built for the paper a property office actually gets: printed supplier invoices, every page of a PDF, one invoice per page. It reads the vendor, dates, PO, subtotal, tax and total, and holds anything it cannot read with confidence.

It produces the checked record and the queue; it does not pay bills or post into your accounting software. Your bookkeeper keeps the decisions and loses the typing, and starts from a queue of exceptions instead of a pile of paper.

Handwritten bills and receipts with no total are a different scope, and so is a language other than English: the OCR layer takes Tesseract language packs, but the field labels are English and Canadian invoice labels, so a new language needs its labels mapped first. If that is what your month looks like, say so before we quote; the scope changes and the quote should too.

The capture tool is open source and runs with no dependency beyond Tesseract: github.com/devops-gm88/invoice-capture. The measured result, with its limits stated, is on the proof page.

Questions this raises.

Is local OCR accurate enough for supplier invoices?

On a clean, straight, 300 dpi printed page it reads every field of the six synthetic invoices in the repository: 48 of 48 expected values. That is a clean page, not a photograph of one, and it is not a general accuracy claim. The design assumes the page may be bad, so a record that cannot be read is held rather than guessed.

What happens when the scan is poor?

The record is held, with the reason. A page below about 200 dpi is upscaled to 300 dpi and marked as upscaled, which raises the confidence a field must reach. If the numbers still do not add up or a field is missing, the record goes to the review queue and nothing is filed. There is no path where a wrong number is filed silently.

Does this replace a bookkeeper?

No, and it is not trying to. It removes the typing: clean invoices are filed automatically, and your bookkeeper spends the time on the exceptions instead of rekeying every page. It does not pay bills, post to accounting software, or approve anything.

Tell us what is not working.

Describe the problem in a few lines. You get a plain answer about whether it is worth fixing and what it would take, before any money changes hands.

Start a conversation