Docling OCRIndependent Docling guide

Verification

Checking Docling's output against the page

An export that looks right and a page that is right are two different claims. The gap between them is closed by counting, by reading the figures, and by asking the output where each cell came from.

Updated 2026-11-01 · 3 min read

The short version

  • –Docling keeps cell geometry in its JSON. That is what makes a cell-by-cell check possible at all: every value has a page and a box behind it.
  • –Count rows and columns before reading any value. A grid fault makes every value check below it worthless.
  • –Read figures and identifiers twice; prose once. A misread digit produces prose that reads perfectly.
  • –A clean export says the page was parsed without an obvious break. It does not say the figures match the paper.

Start from the grid, not the values

Every failure that matters downstream is a structural one, and structure is checked with two counts. Compare the number of columns in each row against the header, then the number of rows against the printed table. Both are seconds of work and both catch faults that no amount of reading finds, because the text of a collapsed table is still fluent.

Only after those two counts agree is a value check meaningful. A right number in the wrong column is still wrong, and it is the kind of wrong that survives a proofread.

Use the geometry the JSON already holds

When Docling is run with table structure enabled, each cell in the document model carries a bounding box on a specific page. That is the evidence a reviewer needs: not "the converter said so" but "the value came from this rectangle on this page".

Turning that into a side-by-side view is a small amount of code — render the page, draw the box, show the text — and it changes the nature of the check from reading two documents to looking at one figure and one box.

Python — find the page and box behind one table cell
doc = conv.convert("report.pdf").document

for table in doc.tables:
    page_no = table.prov[0].page_no        # the page the table is printed on
    table_box = table.prov[0].bbox         # the table's own rectangle
    for cell in table.data.table_cells:
        # newer releases put a bbox on the cell itself; older ones only give the table box
        box = getattr(cell, "bbox", None) or table_box
        print(cell.text, page_no, box.l, box.t, box.r, box.b)

doc.save_as_markdown("report.md", image_mode="placeholder")

The figures to read twice

Numbers are where a reading fails quietly: a swapped digit, a lost decimal, a minus sign that became a hyphen at the end of a line. Read them one at a time against the page rather than skimming the sentence that contains them.

  • Digits and decimal points, especially in a column of similar figures.
  • Minus signs, parentheses and any trailing sign used for negatives.
  • Units that could have moved from one column to the next.
  • Identifiers — account numbers, part numbers, reference codes — where one character is enough to be wrong.
  • The first and last row of every page, where a continuation is most likely to be cut.

What to do when a value disagrees

Write the page's figure into the output and keep the reading you had, if the record matters. What you should not do is let a script "fix" it: a corrected value with no trace of the original is a value nobody can check, and the whole point of keeping the JSON is that the reading is still on file.

Where the page itself is ambiguous — a faint digit, an overprint, a fold — the honest answer is that the document does not settle it. That belongs in a note against the row, not in a guess.

Frequently asked questions

How do I know which page a table came from?+

Each table in the document model carries provenance with a page number and a bounding box. With that, a value can always be traced to the page it was printed on, which is the difference between a conversion you can defend and one you cannot.

Is a clean export a guarantee?+

No. It means the page was parsed without an obvious failure. A character read as its neighbour produces output that is clean, fluent and wrong in one place, which is why the comparison with the page is a separate step.

What should I check first on a long document?+

The pages where the grid changes: the first page of each table, any page with a page break inside a table, and any page that is a scan rather than text. Those three carry nearly all the risk.

Can the check be automated?+

The arithmetic parts can: rows against a printed total, derived columns against their inputs. The comparison of a character with the paper cannot, and any tool that claims to have done it is describing a confidence score rather than a check.

Try it online

Run the same pipeline in the browser — no install, no uploads stored.

Try it in the browser

Keep reading