Documents · 9 min

Extract PDFs and scans with AI: check text, tables and numbers

A PDF that looks clear on screen may supply incomplete or disordered text to an AI tool. Before summarising an archive or filling a table, inspect what was actually extracted and preserve links to original pages.

Aligning a page on a document scanner
AI-generated illustration
Key points

Separate three operations

OCR recognises characters in an image. Layout analysis reconstructs blocks and tables. Structured extraction assigns values to fields. Success at one stage does not validate the next.

  • Original preserved
  • Values checked against the page
  • Uncertainty stays visible

From document to verifiable data

Locate the first failing stage before switching models. Correctly recognised text can still be put in the wrong order or assigned to the wrong field.

Text → Structure → Fields → Verification
The steps are also explained in text.
  1. Text

    Compare a scanned page with one containing selectable text. Empty output does not establish that the original page was empty.

  2. Structure

    Read columns in their intended order. Match each amount to its heading and retain notes that qualify its meaning.

  3. Fields

    For a fictional invoice, distinguish net amount, tax and total. A missing value remains missing; it is not zero.

  4. Verification

    Retain a page or passage reference and check calculations. JSON formatting does not certify factual accuracy.

Which processing path fits your document?

Describe the file without sending it. This guide helps plan a trial; it does not predict software quality or process documents.

Choose file contents and expected output. The paths below remain available without JavaScript.
Paths to test against actual file contents
FileStart withThen check
Selectable textText and structure extraction.Column order, headings and notes; a selectable PDF may still contain useful images.
Scan or imageOCR, followed by structure recovery.Numbers, accents, negations and empty cells against the original page.
Mixed documentPage-by-page diagnosis, then suitable processing.Coverage of every page and consistency between native and recognised text.

For structured fields, add rules for types, units and missing values, then check values against the source page. For local processing, inspect OCR, vision models and plugins too.

Two approaches to examine: Docling · MarkItDown. MarkItDown targets text preparation for analysis; Markdown conversion does not guarantee faithful presentation. Read the official scope.

From document to usable data

  1. Laptop and folders on a private desk
    AI-generated illustration

    1. Identify the document

    Select and copy a passage, then compare it with the screen. Distinguish text PDFs, scans and mixed documents. Locate rotated pages, columns, annotations and tables. Check rights and sensitivity before upload.

  2. Monitor showing enlarged leaf detail, pen tablet and magnifier in a night studio.
    AI-generated illustration

    2. Prepare pages

    Work on a copy. Straighten pages and inspect contrast, noise and clipped areas. Tesseract documentation describes the effect of image quality and segmentation on recognition. Do not alter the image to match presumed text.

  3. AI-generated illustration

    3. Define fields

    Write a simple schema: identifier, value, unit, page and supporting excerpt. Allow missing values and uncertainty notes. Distinguish zero, empty, unreadable and not applicable.

  4. AI-generated illustration

    4. Test difficult cases

    Include a clear page, a multipage table, footnote and unclear value. Compare with human transcription. A polished summary must not hide incorrect table reading.

  5. AI-generated illustration

    5. Reconcile values

    Check signs, decimal separators, units, dates and headers. Recalculate totals where available. Keep raw values before conversion. Do not infer missing data merely to make totals agree.

  6. Editorial illustration

    6. Validate before automation

    Define critical fields requiring systematic review. Measure correction time per document and retain a control sample. Changes to engine, prompt or source format require another trial.

Choose conversion for the required output

Markdown may be enough for text analysis if essential information survives. MarkItDown offers this conversion; check installed components. For layout analysis and structured representation, examine Docling and its exports. Compare both on your files: documented functions do not constitute a fidelity ranking.

A reproducible table check

Prepare three fictional pages: a simple table, a table split across pages and a two-column page with a footnote. For each critical cell, record expected value, raw extracted value, heading, unit and page. Count incorrect values, omissions and wrong associations separately. A correct amount assigned to the wrong customer remains a blocking error.

Check conversion before summarisation

Keep three separate artefacts: original, converter output and model response. If an amount disappears, find the stage where it is lost. Changing a summary prompt cannot restore information that conversion never supplied. Also open the export in another tool and count correction time.

From scanned PDF to the output you need

For a searchable scan, try OCRmyPDF and check PDF search against the visible characters. To transcribe a region or obtain its coordinates, try Tesseract. To extract cells and their headers, compare a layout pipeline such as PaddleOCR or Docling on the same tables. For a scholarly bibliography in TEI XML, compare GROBID output with the PDF citations. Score words, structure and provenance separately.

Put the method to work

Wooden desk with a laptop and monitor
AI-generated illustration

Practical case

Prepare five authorised pages with two tables, a rotated page and an unreadable value. Define ten fields without filling missing values.

Creative studio with a camera and drawing tablet
AI-generated illustration

Evidence to keep

Keep originals, raw text, normalised values, page numbers and human corrections.

Library with books and a research notebook
AI-generated illustration

Make the decision

Accept the batch only after reviewing every critical field and leaving unknown values explicitly unknown.

Verification workshop

Detect correct values in the wrong place

Build three demonstration pages without personal data. Compare each output with the original before requesting a summary.

AI-generated illustration

Two rows, two customers

Input to prepare
A table assigns customer A 120 euros and customer B 210 euros.
Expected result
Each amount remains attached to the correct row and customer.
If the check fails
Inspect cells and headings; a correct total alone cannot validate associations.
Document research with an atlas and books in a library
AI-generated illustration

The footnote

Input to prepare
A fictional offer has an asterisk referring to an exclusion at the page bottom.
Expected result
Extraction preserves the note and allows it to be linked to the offer.
If the check fails
Inspect reading order and the link between marker and note text.
AI-generated illustration

The page without a result

Input to prepare
A document contains a text page, a scanned page and a deliberately unreadable page.
Expected result
Processing distinguishes successful extraction, required OCR and unrecoverable content.
If the check fails
Reject overall success if a page silently disappears; expose limitations page by page.

Decision rule. Validate coverage and associations before summary quality. Retain original, raw extraction and correction decision separately.

Measure extraction

Hands checking a diagram with a ruler and magnifier on a violet and cyan lit table.
AI-generated illustration

Fidelity

Exact values compared with the page before normalisation.

Development workstation with a code screen
AI-generated illustration

Traceability

Every field has a verifiable page and excerpt.

AI-generated illustration

Structure

Cells remain linked to the correct headers.

AI-generated illustration

Useful cost

Preparation and correction time per accepted document.

6 starting points

Explore document tools

These tools cover documents, local models and workflows. Check actual supported formats and quality on your own sample separately.

How is this selection produced?

These profiles are linked to the guide’s subject in our editorial catalogue. Inclusion is neither a ranking nor a performance measurement on your documents. Methodology.

Explore the full category

Related tool families

Frequently asked questions

Does every PDF need OCR?

No. Some PDFs already contain text. First test extraction and reading order; OCR adds a stage that may introduce errors.

How should an unreadable cell be handled?

Leave it unknown, identify the page and request review. A plausible value is not a transcription.

Can important amounts be automated?

Define controls suited to their consequences, including critical-field review. A high overall score can hide a rare, costly error.

The references below expand on the concepts and checks discussed. Scenarios and trial frameworks remain editorial proposals; provider documentation describes its own product rather than an independent benchmark.

Source note

OCR and AI: check passages extracted from scanned PDFs

An image PDF does not necessarily contain faithful page text. OCR can confuse characters, columns, notes and tables. The U.S. National Archives note that OCR is often less reliable than manual transcription, particularly for handwriting or marked documents. Inspect a sample before requesting an AI summary.

Preserve the connection between extracted text and source image: page number, region and any corrected version. For important contractual or numerical information, check every decisive passage against the scan. Disclose uncertain reading instead of allowing AI to turn an OCR error into a confident claim.

Include difficult pages, not only a clear first page: tables, notes, columns and faint passages. Record the page and confusion type for each observed error. Decide which passages need manual correction before summarisation.

In extracted tables, check the relationship between label, value and unit. A correctly recognised number in the wrong column is false information. Keep corrected text separate from raw extraction and link corrections to the image for independent review.

Input
Check scan quality and reading order.
Extraction
Compare names, numbers and tables with the image.
Output
Summaries with page references and visible uncertainty.

Is searchable OCR text enough as evidence?

No. For important data, return to the page image and check that extraction has not moved or altered characters.

Fictional example — a two-column table

Extraction recognises every number but swaps two columns. The reader checks headings against the scan, corrects value associations and cites the page before requesting a summary.

Try the reasoning

OCR reads “1 500” as “1500” but assigns it to the wrong column. Which check should be added?

Reasoning: Preserve table position and headings. A correctly transcribed number can still be attributed to a different measure.

Primary source : U.S. National Archives — Citizen Archivist FAQ

Official sources

Continue with another guide

Keep evidence from this trial

Connect this material to a decision and a retest condition. Prepare a decision record →