Skip to content
Blogguide

GUIDE

OCR vs invoice data extraction: text is only the first step

An OCR result can contain every visible word and still produce an unusable invoice spreadsheet. The missing step is assigning meaning and structure to those words.

By Kaliits · Reviewed · Editorial standards

Recognition answers “what does it say?”

OCR recognizes characters from an image. A digital PDF may already contain text, so it can be read without first recognizing pixels. Either way, the first result is text, often accompanied by coordinates.

Invoice extraction answers a different question: what is the invoice number, who issued it, who receives it, and which amounts belong to which rows? Those answers must become a consistent structure across supplier layouts. A full-page text dump alone does not provide that structure.

Stage

Example output

Typical failure

Recognition

“Total TTC: 120,00 €”

120,00 becomes 12O,OO.

Mapping

total = 120.00, currency = EUR

Subtotal is selected as the final total.

Validation

100.00 + 20.00 = 120.00

A discount or shipping charge is omitted.

Export

Numeric amount in an XLSX cell

An invoice ID loses its leading zeros.

Find the failing stage before changing models

Start with a field that is wrong in the export. Find its printed value on the original, then inspect the recognized text. If the name or number is already incorrect in that text, a mapping model cannot reliably recover it by guessing. Improve recognition or source quality first.

If the text is correct but assigned to the wrong field, examine the layout and surrounding labels. A delivery address can be confused with the billing customer. A “Total” above tax can be mistaken for the final total. Those are mapping problems, even if every character is perfect.

A small example of a large spreadsheet error

Suppose an invented invoice has two rows: 2 × 50.00 = 100.00 and 3 × 20.00 = 60.00. Subtotal is 160.00, tax is 32.00 and total is 192.00. An extractor that returns the correct total but merges both descriptions into one row has still failed the line-item job.

Conversely, an extractor could preserve both rows but mistake a purchase order number for the invoice reference. That error may make duplicate detection or supplier reconciliation harder. A single accuracy percentage hides these different costs.

Choose an output that matches the task

Use plain text for copying a paragraph or making words searchable. Use a spreadsheet for filtering and reviewing invoice records. Use JSON when a script needs nested line items and explicit missing values. None of these outputs replaces the original document.

For a finance workflow, measure the work that remains: corrected fields, corrected cells, missing rows, and review time per invoice. Evaluate the hardest supplier layouts, not just a clean one-page example. Keep a record of recognition errors separately from mapping errors.

A short review that protects the spreadsheet

Check the supplier and customer separately, then the invoice reference, date and currency. Compare each line with the original. A correct total does not prove that the descriptions or quantities are right.

Keep invoice IDs as text, including leading zeros. Check decimal separators and date conventions before combining files from different countries. Missing values need attention; a blank field is more useful than an invented value.

  • Compare row count and continuation pages.
  • Check quantities, unit prices and line amounts.
  • Check subtotal, discounts, charges, tax and total.
  • Export a copy and retain your source in your own archive.