Engine notes · 2026-09-12
Before and After: Teaching Our Engine to Read Bad Scans
Born-digital PDFs are the easy case — the text is in the file, and we read it exactly. The hard case arrives crooked, photocopied, faxed twice, and photographed under a kitchen light. This is the story of what our engine used to do with those documents, and what it does now.
Before: the confident liar
Early this summer we did something uncomfortable: we built a torture corpus. Real faxes with banner noise. Photocopies of photocopies. Statements photographed at an angle. Dot-matrix receipts on thermal paper. Then we ran our own engine on it and wrote down, honestly, everything it did.
It was worse than we thought — and worse in a specific, dangerous way. The engine wasn't just missing things. It was inventing them. On one run across a noise-heavy test set, it produced 26 tables that did not exist — neat rows and columns confidently assembled out of smudges, scanner banding, and bleed-through. Digits ran together, so ₹1,240.00 and a quantity of 2 could fuse into one number that meant nothing. A page it couldn't handle would simply vanish from the output, silently, and the export looked cleaner for it.
If you've ever fed a scan to any extraction tool and gotten back a spreadsheet that looked plausible, that's the failure mode to fear. Not the obvious garbage — the plausible garbage. A fabricated table doesn't look fabricated in Excel. It looks like data. Someone sums the column. Someone makes a decision.
The rule that changed everything
We adopted one rule and made it law: fabrication never buys recall. The engine is not allowed to get "better" at reading by getting braver at guessing. Every change we ship has to pass a permanent tripwire — a corpus of noise pages, blank forms, and table-free documents on which the engine must produce zero tables, forever. If a proposed improvement recovers a hundred real values but invents one fake table on the tripwire, it dies. We have killed a lot of promising-looking changes this way. We do not regret one of them.
After: the honest reader
Months of measured, adversarial iteration later — every change benchmarked on real faxes, real invoices, real filings before it ships — here's the same engine on the same torture corpus:
The 26 phantom tables are zero. The tripwire corpus runs on every single engine change, and it has stayed at zero. When PDFTrail shows you a table from a scan, it's because the page contains structured evidence of one — not because a cluster of noise looked table-ish.
Glued numbers come apart. A long campaign against digit-fusion means amounts land in their own columns, aligned the way the page prints them. On scanned pages the spreadsheet is now built from the same table structure you review on screen — what you check is what you get.
Crooked pages straightened. The engine now measures and corrects skew on tilted scans before reading them, and it reads embedded images inside otherwise-digital PDFs instead of skipping them.
Silence replaced by a second look. The last "before" behavior to die was the quiet skip. A Reddit commenter put it perfectly: in a 100-page financial report, a warning with page numbers matters more than a clean-looking spreadsheet that quietly omits a row. In version 1.3, Table Review opens by itself when a page needs a look: a page whose tables were partly read or not read.
What we won't tell you
We won't tell you it's perfect, because no OCR is, and the ones that claim to be are the confident liars of the first act. Hard scans still produce errors; that's precisely why the review step exists. What we can tell you is the direction of every change: fewer inventions, fewer fusions, fewer silences — measured on real documents before anything ships, with a tripwire that keeps us honest when we're tempted to be clever.
The work continues. The bar we've set for ourselves is simple to state and brutal to reach: keep going until the engine reads a bad scan as well as the best systems on earth — without ever learning to guess.
Try it on your worst document
Don't try PDFTrail on a clean PDF — anything can read those. Feed it the crumpled thing in your scans folder. Everything runs on your Mac: no account, no uploads, free to try.
GET PDFTRAIL — MAC APP STORE