OCR
Optical Character Recognition — software that converts scanned or image-based PDF pages into searchable, selectable text.
OCR stands for Optical Character Recognition. It is a technology that analyses an image of text — whether a photograph, a scanned page, or a raster image inside a PDF — and converts it into machine-readable, searchable, selectable text. OCR is what transforms a scanned PDF from a silent picture into a document you can search, copy, and process.
When a physical document is scanned, the scanner produces a photograph of the page. The PDF is created from that photograph. The words you see on screen are pixels in an image — the PDF has no idea they are text, letters, or words. You cannot click to place a cursor, select a sentence, or search for a word. OCR analyses the patterns of dark and light pixels, recognises character shapes, and writes the corresponding text characters into a text layer behind or alongside the image.
The quality of OCR output depends on the scan quality (resolution, skew, contrast), the quality of the original print, the language, and the OCR engine. Modern engines like Tesseract, ABBYY FineReader, and cloud-based services achieve accuracy rates above 99% on clean printed text.
How OCR works inside a PDF
When OCR is applied to a scanned PDF, the resulting text is not placed visibly on the page — it is written into a hidden text layer that sits beneath the visible image. The image stays as-is, so the document continues to look exactly like the scan. The text layer is invisible to the reader but fully accessible to software.
This architecture serves several purposes. Search (Ctrl+F) queries the text layer, so you can find words even though they appear as pixels. Copy-paste extracts text from the layer. Screen readers read the text layer aloud. The PDF's index and the document's bookmarks are built from the text layer.
Some OCR workflows produce a "searchable PDF" with this image-plus-text-layer structure, while others replace the image entirely with vector-rendered text. The former preserves the visual appearance of the original; the latter produces a cleaner, smaller file that no longer looks like a scan.
OCR accuracy and common failure modes
OCR accuracy depends on several factors:
**Scan resolution** — At least 300 DPI is recommended for reliable OCR. Lower resolutions cause characters to merge or lose distinguishing features. 600 DPI is ideal for small print.
**Skew and rotation** — Pages scanned at an angle cause misalignment that confuses character recognition. Good OCR engines apply deskew correction automatically.
**Font and print quality** — Decorative fonts, handwriting, and faded print reduce accuracy significantly. Standard serif and sans-serif typefaces at normal sizes achieve the highest recognition rates.
**Language and special characters** — OCR engines are trained per language. Mathematical notation, chemical formulae, tables, and mixed-language documents require specialist configurations.
**Degraded originals** — Old documents with foxing, staining, torn edges, or ink bleed are harder to recognise. Pre-processing (contrast enhancement, noise removal) can improve results.
OCR in legal, medical, and archival contexts
OCR is a critical step in any workflow that involves large volumes of scanned documents. Legal discovery processes involve reviewing thousands of scanned case files — OCR makes them keyword-searchable, drastically reducing review time. Medical records archiving converts paper patient files into searchable digital records. National archives apply OCR to historical newspapers and manuscripts to make them accessible.
In these high-stakes contexts, OCR accuracy is critical. Post-OCR review and correction (sometimes called "keying and verifying") compares the recognised text against the original image and corrects errors. For critical legal or medical documents, human verification of OCR output is standard practice.
Accessibility standards such as PDF/UA require that PDFs contain a text layer — for scanned documents, this means OCR must be applied before the document is published or shared.
Frequently asked questions
What is OCR and why is it used on PDFs?
OCR (Optical Character Recognition) converts images of text in scanned PDFs into machine-readable text. Without OCR, a scanned PDF is just a picture — you cannot search, select, or copy the text. OCR adds a text layer so the document becomes fully searchable and accessible.
How can I tell if a PDF has had OCR applied?
Try selecting text on the page. If you can click and drag to select words, the document has a text layer (either originally digital or OCR-processed). If clicking does nothing or selects the entire image, it is a scanned PDF without OCR.
Does OCR change how the PDF looks?
Usually not. The standard approach adds an invisible text layer behind the visible scan image. The document continues to look exactly like the original scan. Some tools can also convert the image to rendered text, which changes the visual appearance.
What scan resolution is needed for accurate OCR?
300 DPI (dots per inch) is the standard minimum for reliable OCR on printed text. For small fonts or degraded originals, 400–600 DPI is recommended. Scans below 200 DPI typically produce poor OCR quality.
Can OCR recognise handwriting?
Modern OCR engines have improving handwriting recognition, but accuracy is significantly lower than for printed text. Handwriting varies enormously in style, size, and legibility. For reliable handwriting recognition, specialist Intelligent Character Recognition (ICR) systems are used in contexts like postal addresses and forms.