About Services Tools Blog Contact us

Invoice and Receipt Field Extraction

Reads invoice and receipt PDFs, including scans, and pulls out supplier, date, net, VAT and total so they can be checked against Xero.

  • Document Understanding & OCR
  • Professional services
  • Pipeline
  • Productised
  • Local/private
  • 2026

The problem

Purchase invoices arrive as text PDFs, phone photos and blurry till slips. Someone still keys the total and the VAT into Xero by hand. A transposed figure is only caught when the VAT return is prepared.

What it does

You give it an invoice or receipt PDF and, if you have it, the Xero total. Text PDFs are read directly. Scans, and any text PDF with no total, go through the Mac's built-in text recognition. A local Gemma model then fills in supplier, date, net, VAT and total. Net plus VAT must equal the total, and a VAT number must appear as digits in the source. The result is compared with the Xero figure.

Outcomes

  • Supplier, date and VAT amounts are lifted from the document without rekeying.
  • A sum that does not add up is flagged before it reaches Xero.
  • Scans and text PDFs go through one process.
  • The document never leaves the machine.

Simplified mockup

Interactive preview with sample data. Nothing is sent to a server.

Invoice and Receipt Field Extraction

Three documents in this batch
INV-2408 text layer
Text invoice from Harbour Lane Paper for 240 pounds
Receipt photo OCR
Photographed cafe receipt from Pebble Quill, total 17.40
Till slip blurry scan
Blurry market till slip with a total that does not add up

Ledger check

Rule
Net + VAT = total
Otherwise the card is a mismatch
VAT number
Digits in source
A number the page does not contain is dropped
Ledger
Optional
Scored when a figure is supplied
This batch against the sample ledger
DocumentNetVATNet + VATPrintedLedgerVerdict
INV-2408 Harbour Lane Paper 200.00 40.00 240.00 240.00 240.00 match
Pebble Quill receipt 14.50 2.90 17.40 17.40 none balanced
North Quay Market till 4 6.40 1.28 7.68 8.90 none mismatch

How each file was read

INV-2408.pdf text layer

The total is already in the text, so on-device OCR is skipped.

HARBOUR LANE PAPER INV-2408 3 March 2026 Net 200.00 VAT 40.00 Total 240.00 VAT GB 182 736 455
receipt.jpg OCR
no text layer

Phone photo of a thermal receipt. Read on the device, then the same field block as the invoice.

till.jpg OCR
low contrast

Blur and a flash patch. The fields still come back, and the arithmetic check rejects the printed total.

Documents this week

How it works

  1. Read a text PDF directly first.
  2. Send scans, and text PDFs with no total, through the Mac's text recognition.
  3. Ask Gemma to fill in supplier, date, net, VAT and total.
  4. Check that net plus VAT equals the total.
  5. Accept a VAT number only when those digits are in the source text.
  6. Compare the result with an optional Xero figure.

Pipeline

flowchart LR
  A["Invoice PDF"] --> B{"Text layer?"}
  B -->|Yes| C["Read text"]
  B -->|No| D["macOS Vision"]
  C --> E["Fill fields"]
  D --> E
  E --> F{"Net plus VAT matches?"}
  F -->|Yes| G["Ready for Xero"]
  F -->|No| H["Mismatch card"]

Output