
What decides OCR quality on a scanned PDF
OCR accuracy is set by the image, not the engine: resolution, binarisation, skew, compression artefacts, language data and layout. Plus how to judge the output.

The table you see in a PDF exists in your eyes, not in the file. Extraction rebuilds it from geometry, and the places where that reconstruction goes wrong are entirely predictable.
A PDF page is a list of drawing instructions, not a data structure. The content stream says "pick this font, move to this point, paint these glyphs, stroke a line from here to there". There is no notion of a row, a column or a cell anywhere in that list. What you recognise as a bank statement or a price list is simply text that has been positioned in neat vertical alignment, sometimes with rules drawn around it.
The one exception is tagged PDF. If the producer wrote a logical structure tree, the file really does containTable, TR and TD elements, and extraction becomes reading rather than guessing. In practice most files that come out of a print driver, a legacy reporting engine or a "save as PDF" menu carry no tags at all. So the job an extractor performs is reconstruction: rebuilding a structure that was thrown away at export time, using geometry as the only evidence.
Open the file and try to drag-select one row of the table. That single gesture tells you which route to take.
The tool collects horizontal and vertical strokes plus thin filled rectangles, finds where they intersect and builds a cell grid from those intersections. Each run of text is then assigned to whichever cell its centre falls into. On a ruled invoice or an audited financial statement this is close to exact. Camelot calls this its lattice mode, and the same idea sits behind most commercial extractors.
With no lines to work from, all that remains is coordinates. A text extractor knows the horizontal start and end of every glyph box. The tool looks for vertical corridors that run down the whole page without a single glyph crossing them, and treats those as column boundaries. Rows come from the same logic on the vertical axis, clustering glyphs whose baselines sit within a tolerance of each other. Because it is a heuristic, it is sensitive to thresholds: tighten the corridor test slightly and two columns fuse, loosen it and one column splits in half.
Right-aligned numeric columns are the classic trap. A three-digit figure and an eight-digit figure start at different x positions, so the corridor test sees no clean gap on the left side of the column, while a left-aligned header above it may land in the neighbouring column entirely.
| Symptom | Cause | What to do |
|---|---|---|
| One cell's text spills onto its own row below | Multi-line cell: the wrapped second line is read as a separate record | Raise the row tolerance, or merge rows whose key column is empty into the row above |
| First column empty, everything shifted right | Merged cell: one wide cell spans several grid columns | Forward-fill the merged value; most exports write it only into the first column |
| Header row scattered across single-letter columns | Rotated header: the text matrix is turned 90 degrees, so glyph boxes stack vertically | Exclude the header band from extraction and type the column names yourself |
| The same header reappears in the middle of the data | Page break: the table header is reprinted on every page | Extract page by page and concatenate while dropping repeated headers |
| Numbers land in Excel as text | Thousands and decimal separators do not match the sheet locale, or a non-breaking space sits inside the number | Normalise separators, strip currency symbols, then convert the column to a number type |
| Words run together or letters come out spaced | The font applies spacing through positioning operators rather than actual space characters | Adjust the word-separation threshold, or regenerate the PDF from its source if you can |
Five of those six come from visual choices in the source document. The prettier the table, the harder it is to rebuild; a plain ruled table with single-line cells extracts correctly in almost any tool.
The same extraction looks different as CSV and as xlsx. CSV carries values only: cell formatting, merges and multi-line content are gone, and a line break inside a cell becomes a quoting problem that can corrupt the whole file. xlsx keeps cell types, so the number-versus-text distinction is visible in the file itself. If the data is heading into a database or a script, CSV is convenient; if a human is going to eyeball it first, xlsx saves work.
Wide reports hide one more trap. Some are printed in landscape by writing a rotation angle onto the page object while the text coordinates stay in the unrotated space, so an extractor may look for columns along the wrong axis. When the output is not merely wrong but nonsensical, try normalising the page rotation and running it again.
If the page is an image there are no glyphs to extract. Characters have to be recognised first, then the recognised boxes have to be grouped into rows and columns. The two steps feed each other: on a page scanned a degree or two off square, baselines drift and the vertical corridors close up, so the table can split wrongly even when every character was read correctly. Run PDF OCR first, and see what actually determines OCR quality before you blame the table extractor.
Table extraction fails quietly. The file opens, the columns look like columns, and two rows have silently merged. A five-minute check catches it.
One caveat worth stating plainly: the PDF tools on this site upload your file to a server for processing. If the document is a payroll run or a signed contract, read how redaction really works before you share it, because drawing a black box over a name does not remove the name.
It depends on the source document. When the table is ruled, the tool builds its grid from the strokes and the result is usually exact. With no ruling lines, columns are inferred from whitespace alone, and merged cells, wrapped cells and rotated headers all break that inference.
Not directly, because there is no text on the page. OCR has to recognise the characters first, and then the recognised boxes are grouped into rows and columns. On skewed or low-resolution scans that second step produces more errors than the recognition itself.
Usually a separator mismatch: the document prints 1.234,56 while the sheet expects a decimal point. Non-breaking spaces and currency symbols inside the figure do the same thing. Normalise the separators, strip the symbols, then convert the column to a numeric type.
Compare the row count with the PDF, confirm every row has the same number of filled cells, and recompute any grand total the document prints. If the total does not match, either a row was lost or a value is still a string.
In a tagged PDF the producer stored the table structure in a separate logical tree, so extraction is reading rather than guessing and cell boundaries come out right. Documents prepared for accessibility are often tagged; files produced by printing to PDF almost never are.

OCR accuracy is set by the image, not the engine: resolution, binarisation, skew, compression artefacts, language data and layout. Plus how to judge the output.

A black rectangle hides text without deleting it. Where PDFs keep the original content, how to remove it properly, and four ways to verify a redacted file.