OCR — Optical Character Recognition — is the technology that bridges the gap between a photograph or scan of text and a digital, editable document. Without OCR, a scanned PDF is just an image. With OCR, it becomes searchable, copyable, and convertible text.
What Is OCR?
OCR is software that analyses a raster image (a photograph, scan, or screenshot), identifies letter shapes and patterns, and converts them into machine-readable text characters.
The result: an image of the word "invoice" becomes the actual text characters i, n, v, o, i, c, e — which you can select, copy, search, and edit.
OCR has been in use since the 1950s in industrial and postal sorting contexts. Modern software-based OCR emerged in the 1980s, and today's deep-learning OCR engines achieve near-human accuracy on clean printed text.
How OCR Works: Step by Step
1. Image pre-processing
Before character recognition, OCR software improves the input image:
- Binarisation: Converts the image to pure black and white to increase contrast
- Deskewing: Detects and corrects page tilt (documents placed slightly crooked on a scanner)
- Despeckling: Removes noise and scan artefacts
- Line detection: Identifies text baseline orientation
2. Text region detection
The software identifies regions of the image that likely contain text vs. regions that are images, blank space, or graphics. In complex documents (newspapers, brochures, multi-column layouts), this step determines reading order.
3. Character segmentation
Within each text region, the software separates individual characters by analysing gaps in the image data.
4. Character recognition
Each character segment is compared against a model of known letter shapes. Modern OCR engines use neural networks trained on millions of character images and can handle varied fonts, sizes, and print quality.
5. Contextual correction
After individual characters are identified, language models check that the result makes sense in context. The word rn might be recognised as m by the character recogniser, but a language model knows rn is rarely a valid English token and corrects it accordingly.
6. Output
The recognised text is assembled into the output format — editable Word document, searchable PDF, plain text, or other formats.
When Do You Need OCR?
You need OCR when:
- A PDF is a scan and you cannot click to select text
- You have a photo of a document (taken with a phone camera)
- You received a faxed document saved as an image
- You have old, printed documents that were digitised by scanning
- You want to make a PDF searchable without fully converting it
You do not need OCR when:
- The PDF was created digitally (from Word, Google Docs, etc.)
- You can already click and select text in the PDF
OCR vs PDF Text Extraction
| | OCR | PDF text extraction | |---|---|---| | Input | Image-based PDF or image file | Text-based PDF | | Mechanism | Analyses image, recognises characters | Reads embedded text layer | | Accuracy | 95–99% for clean scans | 100% (reads actual data) | | Required when | Scanned/image PDFs | Never — it always reads correctly |
Limitations of OCR
Handwriting: Printed text OCR does not work reliably on handwriting. Specialised handwriting recognition models exist but are outside the scope of standard tools.
Decorative fonts: Very stylised or unusual fonts produce more errors.
Poor scan quality: Faded, blurry, or low-resolution scans reduce accuracy significantly. Scanning at 300+ DPI with good contrast is the single biggest improvement you can make.
Complex layouts: Tables, forms, and multi-column documents often require post-conversion cleanup.
Mathematical notation: Standard OCR does not recognise mathematical symbols and equations reliably.
Related guides: How to Convert a Scanned PDF to Word · How to Convert PDF to Word