Two completely different ways to build the same-looking page
A PDF page can be built in two fundamentally different ways that can look identical to a person reading them on screen. The first is a real text layer: the page contains actual character data — the letter A is stored as the letter A, with a font and a position, and a computer reading the file can extract it directly as text. The second is a rasterised image: the entire page, text included, is stored as a grid of coloured pixels, exactly like a photograph. To a computer, a rasterised page of text contains no characters at all — just pixels that happen to be arranged in a pattern a human eye recognises as letters.
A scanned document — a paper page fed through a scanner or photographed with a phone and saved as a PDF — is a rasterised image by definition, because a scanner captures light and colour, not characters. It doesn't matter how crisp the scan is or how legible the text looks on screen: there is no character data in the file for a program to extract, because none was ever created.
Why this isn't something a text-extraction tool can just fix
Extracting text from a real text-layer PDF is a simple, exact operation — reading data that's already there in the file, in the format it was written in. Extracting readable text from a rasterised, image-only PDF is a completely different and much harder problem, called optical character recognition (OCR): a program has to look at the pixels, identify shapes that resemble letters, and guess which letters they most likely are. That guess can be wrong — poor scan quality, unusual fonts, low resolution, or an image at an angle all increase the error rate — which is why OCR is a genuinely separate technology from text extraction, not a more thorough version of the same thing.
| Real text layer | Scanned / image-only | |
|---|---|---|
| What's actually stored | Character data with font and position | A grid of coloured pixels |
| Can you select and copy the text? | Yes, directly | No, not without OCR |
| Extraction is | Exact - reading data that exists | A guess - recognising shapes as letters |
| Typical source | Exported from Word, a web page, or similar | A scanner or phone camera photo of paper |
How to tell which kind of PDF you actually have
- Try selecting a word of text in a PDF viewer with your mouse — if a real text cursor highlights individual letters, it has a text layer; if nothing highlights (or the whole page selects as one image), it's rasterised.
- A PDF made by "printing" or "exporting" a document from Word, a web page, or similar software will almost always have a real text layer.
- A PDF that came from a scanner app, a photocopier's "scan to PDF" function, or photographing a document with a phone is almost always rasterised, even if it looks perfectly sharp.
- A PDF's own metadata sometimes hints at its origin (the software that created it), which can be a clue even before you try selecting text.
Why a text-extraction tool should tell you which one you have
A text extraction tool that silently returns an empty or near-empty result for a scanned PDF, with no explanation, leaves the person using it to wonder whether the tool is broken, the file is corrupted, or something else went wrong — when the real answer is simpler: there was never any text there to extract in the first place. The honest, useful behaviour is to detect that a page produced very little or no text and say so plainly, rather than returning a blank result with no context for why.
Where this comes from
- The distinction between vector/text-layer PDF content and rasterised image content is part of the core PDF specification (ISO 32000), which defines both text-showing operators and image XObjects as legitimate, distinct ways to place content on a page.
- Optical character recognition as a distinct field of computer vision research, separate from text extraction from structured formats, is well established and documented across decades of OCR literature.