Scanned PDFs: why conversion returns an empty file, and what OCR does
4 min read · Updated 2026-09-12
You convert a PDF to text and get an empty file. You convert it to Word and get a document full of images with no editable words. The conversion did not fail — your PDF does not contain any text, and no amount of converting will produce text from a file that has none.
The two kinds of PDF
A digital PDF was generated by software from a document. It contains actual character data: this glyph, this font, this position. Text extraction reads that data directly out of the file. It is fast, it is exact, and it is what makes PDF a useful document format.
A scanned PDF was generated from an image. A scanner, a phone camera, or a fax produced a picture of a page, and that picture was wrapped in a PDF container. To the file format there is no difference between this and a PDF of a photograph — there are no characters in it, only pixels arranged to look like characters.
Both open in the same viewer and look the same on screen. Only one of them contains words.
The two-second test
Open the PDF in any viewer and try to select a sentence with your cursor.
If a selection highlight appears over the words and follows the line, there is a text layer and any conversion will work normally. If you get a rectangle over the whole page, or nothing selects at all, it is an image and you need OCR before converting.
A second check: use the viewer's search function to look for a word you can see on the page. If search finds nothing, there is no text.
What OCR actually does
Optical character recognition runs the page image through an engine that recognises the shapes as characters. Our pipeline uses Tesseract. The result is a text layer that can be added invisibly behind the page image, producing a searchable PDF that still looks exactly like the scan but now contains words a computer can read.
That is the key move. You do not replace the scan; you augment it. Once the PDF is searchable, every normal conversion works: PDF to Word extracts the recognised text, PDF to plain text produces a transcript, and the PDF itself becomes searchable in any viewer.
The same engine handles direct image-to-text conversion, if all you want is the words out of a photograph without producing a PDF first.
How to get good OCR results
OCR accuracy depends almost entirely on the input. The engine is pattern-matching shapes; give it clean shapes and it does well, give it ambiguous ones and it guesses.
- Resolution matters more than anything else. Scan at 300 DPI. At 150 DPI small text becomes mush and accuracy drops sharply.
- Contrast matters next. Clean black text on white paper reads well. Grey text, coloured backgrounds, highlighter, and photocopier shadow all hurt.
- Straight pages read better than skewed ones. A page photographed at an angle, or a book photographed with a curved spine, is the hardest case there is — the characters are distorted differently across the page.
- Print reads far better than handwriting. Handwriting recognition is a genuinely different and much harder problem, and general-purpose OCR should not be expected to do it well.
- Standard fonts read better than decorative ones. Script faces, heavy stylisation, and very condensed type all raise the error rate.
What OCR does not preserve
Recognised text is a flat run of lines. Column structure, table boundaries, headings, and reading order are inferred from layout at best, and lost at worst. A scanned financial table will come back as text in roughly the right order, not as a table you can sum.
Nothing about the typography is recovered either — the output is characters, not the original fonts and styling.
And OCR makes mistakes. `rn` becomes `m`, `0` becomes `O`, `1` becomes `l`. On a page of prose these are easy to spot and fix. On a page of account numbers they are not, which is why OCR output should never be trusted for identifiers without checking it against the image.
The workflow, in order
Test whether the PDF has a text layer. If it does, convert directly — you are done.
If it does not, run the searchable-PDF/OCR step first to add one. Then convert the result to Word, text, or a spreadsheet as normal.
If the scan is poor, fix the scan before fixing the conversion. Rescanning at 300 DPI takes less time than correcting a page of bad recognition, and it is the only step in this whole process that actually improves the input rather than working around it.