How a Scanned PDF Gets Searchable Text
The word turn is visible on a scanned page in a World Wide Web Consortium demonstration. In the text extracted from the accompanying PDF, the same word reads tum. A scan stores a picture of the letters, and a PDF viewer’s Find feature searches stored characters. Optical character recognition, or OCR, supplies those characters by interpreting the picture. The result can make a page searchable while leaving the printed word exactly where it was and the spelling error out of sight.

The consortium uses a scanned page with a heading that reads Schnitzelbank Pot. The heading survives as text in the processed file. Farther down, the small error in turn shows why a successful search for a heading tells only part of the story. Both readings are available in the same file: the eye has the page image, and the software has the letters the recognition step supplied.
A picture of the page
A scanner samples the surface of a page as a grid of pixels, the small picture elements that make up a digital image. The same grid holds the pale paper, the dark strokes of the type, and the spaces around the letters. An image-based PDF can carry that whole picture on its page. It carries the shape of the heading in the same form as the surrounding paper: as a pattern of light and dark.
With the image displayed at reading size, the strokes in turn call up a familiar word. The file format can preserve those strokes in a viewable page regardless of whether there is a corresponding word stored as text. A viewer can enlarge the image and let a reader look closer. The operation changes the view of the picture. Find takes a different route through the file, looking for the characters typed into its search box.
Resolution affects the detail available in that picture. The more closely spaced the samples that make up the grid, the more room there is to represent a narrow gap between strokes, provided the print itself is clear. Enlarging the finished scan is a different operation. It makes existing details easier to inspect on screen, while OCR still has to work from the underlying image. That is why the consortium’s description gives both resolution and the clarity of the original text a role.
The consortium’s description of its OCR technique points to export from a word processor as a way to start with actual text. The export can carry over the characters the author typed. A scan of a printed copy captures their appearance. The two PDFs can show the same heading in the same place, but only the scan needs recognition to recover the letters.
| Route | Starting material | How the heading is stored |
|---|---|---|
| Export from a word processor as text | Stored characters in the source document | Text carried over from the document |
| Image-only scan | A page picture made of pixels | A picture of the heading |
| Scan processed with image-preserving OCR | A page picture and the recognition result | Embedded text alongside the picture |
The text that Find reads
The consortium’s Accessibility Guidelines Working Group describes the conversion this way: "Depending on the resolution and how clear the text was, OCR converts images of words and characters to actual text." In practical terms, the software has to assign characters to groups of marks. The small gap and different contours that let a person read r followed by n are also parts of the image the software has to interpret. The PDF can then contain the result of that interpretation as text.
What is often called a searchable text layer is that text stored alongside the page image. In an image-preserving version, the viewer still draws the scan for the reader. The recognized characters supply the material that Find can match. The file can also associate the text with a position on the page, so a viewer can locate a hit in the displayed image. The consortium’s processed example contains text at the location of the Schnitzelbank Pot heading while retaining the scanned picture of it.
A line near the top of the page yields ¼ pound butter when extracted. The fraction survives as a single character, so it can be copied along with the words. The page image stays available to check the symbol against the print.
- Capture: The heading enters the PDF as part of the page picture.
- Recognize: The software interprets the shapes as characters.
- Store: The PDF carries the recognized characters with a position on the page.
- Find: The viewer looks for the typed characters in the stored text.
The U.S. National Archives and Records Administration described this separation in a technical reference issued March 31, 2003. Its example of image-preserving OCR, Searchable Image - Exact, added searchable text without changing the original bitmap, the grid of pixels that formed the scanned page. The archived page is now marked as superseded. Its technical distinction matters here: the scan can show what was on the original piece of paper, while the added characters give software a way to find words in it.
That reference also discussed a different kind of output, one that substituted recognized text for the original scanned lettering. In that version, a mistaken character can change what a reader sees. With the image preserved, the same mistake changes the searchable text while leaving the source marks available to inspect. The distinction is between two ways of storing the result of recognition, with different consequences for the page a reader sees.
The archive made a distinction between an uncorrected word and damage to the image itself. It was prepared to take files whose recognized text still contained errors, provided the process left the content and quality of the scan intact. That distinction explains why a file like the consortium’s example is still useful even with a mistake: the unaltered page supplies the evidence a reviewer needs to decide what the word should be.
Preserving the scan also keeps visual details that are outside the job of spelling the words. In the World Wide Web Consortium example, the page includes an image of a hand alongside the print. It remains part of the displayed page, but the consortium treats it as decoration in its tagged version. Tagging describes the role of page elements, such as a heading or a list. The recognition step supplies characters; tags describe the document those characters belong to.
The consortium provides separate PDFs for those stages. Rendered at the same settings, the two examples show the same page image; extracted with the layout preserved, they yield the same text. The tagged file still yielded tum in the same line. Tagging identifies the recipe title as a heading, while the spelling error stays in the searchable text.
- Page image:
- The visible print and surrounding marks from the scan.
- Recognized text:
- The characters available to search and extract.
- Tags:
- Information about the roles of elements such as a heading or list.
Where the recognized word can go wrong
The processed example contains the word Schnitzelbank in its text, where a search can match it. In the line with turn, however, the text extraction returns tum. The error is easy to glide past in a quick read because the bitmap still displays the printed letters. An exact search for the word turn misses that occurrence, even though Find can reach other words on the same page.
The W3C describes a feature of its demonstration software that helps focus the review. Acrobat Pro marks uncertain recognition results as OCR suspects and presents them individually for correction. A suspect is a place where the software has flagged its own reading. The flag supplies a location to compare with the image. The consortium separately calls for checking the result on each converted page, which also makes room for errors that have escaped a list of suspects.
Searching for a known word is a useful spot check when no one is sure whether a PDF has any usable text. A heading like the one in the example offers an easy target because the exact spelling is visible. A hit shows that the viewer found a matching sequence in the file. Searching for tum would find a sequence that matches the search just as well, even though it differs from what was printed.
Selection can extend across a word at the right location and still produce the wrong letters when copied. The highlight tells the reader which part of the page goes with the text; the characters that paste elsewhere are a separate piece of information. A reviewer with the scan and the copied text side by side can check both the location and the spelling.
Saving a text copy changes the evidence available to the reader. The extracted file shows the letters the PDF actually supplies, without the source image filling in their meaning. Side by side, the page and the text expose substitutions and missing material directly. The plain copy is useful precisely because it discards visual information that otherwise makes it easy to read past a defect. For the example line with tum, the misspelling is in view as soon as the image is out of the way.
- Known-word search: A match for the characters entered in Find.
- Suspect review: Specific interpretations the application marked as uncertain.
- Extracted text beside the scan: Characters or passages that differ from the visible page.
The comparison matters most where a small substitution affects how a document will be found later. A short name or a reference written in a line of print can be clear enough to read while the file carries a different spelling. A reviewer comparing the text with the image can see exactly which version a search would use. A corrected entry changes the searchable characters while the scan remains available for the next comparison.
Completeness asks a wider question than spelling. A line can disappear from the extracted text entirely. The visible page supplies a reference for spotting what is missing, including text in a short label or a block set apart from the main paragraphs. That is why the consortium’s test works page by page rather than treating a document-wide search result as evidence that all its text came through.
In the technique updated on July 15, 2025, the W3C gives the next step after recognition: checking each converted page. One documented check is to save the document as text and see whether the conversion is complete. The search box can establish that the heading is present. The saved transcript puts the rest of the page in view, including the word whose last letters the scan and the recognized text disagree about.
Frequently Asked Questions
Why is a scanned PDF not searchable?
An image-only PDF records the appearance of the page, so its words reach the screen as pixels. In that form, the page also lacks the text a reader would ordinarily select or copy. Where a document contains both image-only scans and pages with stored characters, those behaviors can depend on which page is open.
What does OCR stand for?
OCR stands for optical character recognition. Here the term describes interpreting the marks in the scan as characters and supplying those characters for software to use. Scanning and OCR can be offered by the same application, with the image capture and the interpretation performed as separate operations.
Can a searchable PDF still show the original scanned page?
An image-preserving PDF keeps the original scan on screen while the viewer uses separate stored text for the search. For archival work, the image can still carry marks such as the shape of the type even after a reviewer corrects a spelling in the recognized text.
What is an OCR suspect in a scanned PDF?
In the W3C’s Acrobat example, a suspect is text the application thinks may have been recognized incorrectly. The software can present each suspect in turn, so the reviewer can judge it against the printed marks. A flagged result can already be right; the label describes the software’s uncertainty.
How can a saved text copy help verify OCR output?
The saved text shows the characters available outside the PDF page image, which is useful when a word could be wrong in several places. The W3C also describes listening to the converted PDF with a screen reader or other read-aloud tool. Listening provides a second way to encounter the recognized words without relying on what the print looks like.
Sources
- World Wide Web Consortium: Technique PDF7: Performing OCR on a scanned PDF document to provide actual text
- World Wide Web Consortium: Working example of generating actual text
- World Wide Web Consortium: Result of tagging text created with OCR
- U.S. National Archives and Records Administration: Transfer Instructions for Permanent Electronic Records in PDF format