Summary
6 of 6 text-PDF fixtures were extracted with every measured item right.
The 2 scanned fixtures scored between 97.1 and 98.5 percent; the misses were single characters.
Every test file is synthetic. They were generated for this project’s test suite, and the scans were made by rasterizing them with blur, noise and a slight skew. Real bank statements, invoices and scans vary far more, so check a result before you rely on it. Measured 2026-10-18.
Results
| Test file | Source | Layout | Right | Score |
|---|---|---|---|---|
bank-statement | Text PDF | Statement, 13 rows by 5 columns, empty debit and credit cells | 65 / 65 | 100% |
invoice | Text PDF | Invoice with line items and a subtotal, tax and total block | 36 / 36 | 100% |
report-borderless | Text PDF | Borderless report, 7 rows by 5 columns | 35 / 35 | 100% |
report-bordered | Text PDF | The same report with cell borders | 35 / 35 | 100% |
long-statement | Text PDF | Three-page statement, 90 transactions, header repeated on each page, descriptions wrapping onto up to three lines | 90 / 90 | 100% |
complex-sales | Text PDF | Bordered table with a two-level header, a subtotal row and a wrapped label | 4 / 4 | 100% |
scan-bank-statement | Scan (OCR) | The statement scanned at 200 dpi with blur, noise and a 0.4 degree skew | 64 / 65 | 98.5% |
scan-report | Scan (OCR) | The report scanned at 200 dpi with blur, noise and a 0.4 degree skew | 34 / 35 | 97.1% |
What is counted
- cells: Share of ground-truth cells that appear in the same row and column of the largest table found, empty cells included.
- transactions: Share of transactions whose date, debit, credit and balance are found together in the right columns of one row (descriptions are ignored).
- figures: Share of data rows whose four figures are all found in the right columns of one row (labels are ignored).
What it still gets wrong
- Headings that span several columns are not merged: the heading sits over the first column it covers.
- A cell whose text wraps onto several lines becomes extra rows, which the preview lets you merge.
- Columns that touch or overlap cannot be told apart.
- OCR reads single characters wrong now and then, for example a 1 read as an i. Check amounts, dates and signs.
- Handwriting is not recognized: OCR here is built for printed text.
Reproduce it
The files and their ground truth are in backend/crates/pdf-core/tests/fixtures/tables, generated by generate.py. The Rust test table_accuracy.rs fails below a floor for each file, and web/scripts/measure-table-accuracy.ts writes the numbers on this page. Download the data as JSON. To try your own file, use Extract Tables from PDF.