What is OCR? Optical Character Recognition, Explained
OCR — optical character recognition — is the technology that turns pictures of text into real, selectable text. If you have ever scanned a paper document and wished you could search it, copy a sentence out of it, or edit it, OCR is the tool that makes that possible. It is the engine behind every "make this scanned PDF searchable" feature, including the one built into PDFyre.
What does OCR actually do?
A scanner or a photo turns a physical page into an image. To the computer, that image is just a grid of colored pixels — it has no idea the dark squiggles are letters. OCR reads that image, recognizes the shapes as characters, and rebuilds them as actual text with a position on the page.
The result is a PDF that has two layers: the original image (so it still looks exactly the same) and an invisible text layer on top (so it can be searched, copied, and indexed). That is why OCR is often called "adding a searchable text layer to a PDF."
How does OCR work?
Modern OCR is a combination of image processing and machine learning:
- Preprocessing — the page image is cleaned up: contrast is boosted, grayscale is normalized, and skew is straightened so the text is as readable as possible.
- Text detection — the engine finds the lines, words, and individual characters in the image.
- Recognition — a trained neural network compares each character shape against millions of examples and decides what letter it most likely is.
- Reconstruction — the recognized text is placed back on the page at the exact coordinates, preserving the layout, so the searchable layer lines up with the visible text.
Why can't I search my scanned PDF?
When a PDF is created directly from a computer — like an invoice from accounting software or a downloaded report — the text is already inside the file, and search just works. But a scanned PDF is a series of photos. There is no text in it, only pixels. So Ctrl+F finds nothing, copying returns nothing, and search engines cannot index the content. OCR is the fix: it adds the text layer that was never there.
What affects OCR accuracy?
- Scan quality — higher DPI (200–300) and clean, flat pages give far better results than blurry phone photos.
- Contrast — crisp dark text on a white background is ideal; faded or colored backgrounds confuse the engine.
- Language — recognition works best when you tell the engine which language the document is in.
- Type — printed text recognizes well; dense handwriting is much harder and often needs specialist software.
💡 Quick tip: scanning at 300 DPI and keeping pages flat and well-lit gives you the biggest accuracy jump. If your file is already low quality, try the "Max Quality" OCR mode.
When do I need OCR?
- You have a scanned book, contract, or report you want to search.
- You need to copy text out of a photo or scan for an email or document.
- You are applying for jobs, school, or visas and need to turn papers into text.
- You want Google to actually index the content inside your scanned PDFs.
Try OCR free in your browser
PDFyre runs OCR entirely in your browser using the Tesseract engine. You never upload your documents to a server, there is no account and no software to install, and there is no limit on file size beyond what your own device can handle. An 890-page, 132 MB scanned book has been tested successfully.
Make your scanned PDF searchable — free
No uploads. No sign-up. Your files never leave your device.
🔥 Try OCR on PDFyre