How to make a scanned PDF searchable
A scanned PDF is a stack of pictures, so search and copy don’t work. What OCR does, the free ways to add a text layer and how to get the text out today.
You scan a signed contract or an old letter and the PDF looks perfect. Then you try to search it for a name or copy a paragraph and nothing works. That is because a scanned PDF is a stack of photographs of pages. There are no letters in it, only pixels shaped like them.
What OCR does
Optical character recognition looks at the shapes on a page and works out which letters they are. The result can be used two ways: as plain text you copy out or as a hidden text layer added behind each page image so the PDF itself becomes searchable while looking exactly the same.
Getting the text out
Image to text reads scanned PDFs page by page in your browser. Each page is rendered, read and the text appears marked by page, ready to copy or download as a text file. It covers eight languages. For most everyday needs, quoting a paragraph, finding a figure, pasting an address, that is the whole job. The same approach for single images is in how to copy text from a screenshot.
If you can already select text in your PDF, it isn’t a scan and PDF to text extracts it exactly without any recognition.
Adding a searchable layer to the PDF
To keep the PDF and make it searchable, you need a tool that writes the text layer back into the file. Adobe Acrobat’s paid versions do this, as do many scanner apps if you switch on their OCR option at scan time, which is the easiest route for future scans. OCRmyPDF is a free, open-source command-line tool that does it very well for anyone comfortable with a terminal.
Better scans, better text
OCR accuracy depends on the scan. Scan at 300 DPI, keep the page straight and use greyscale or black and white for text. Those settings also keep files small; colour scans at high resolution are the main reason scanned PDFs are huge, as explained in why won’t my PDF get smaller. Compress PDF helps with scans you already have.
For a related next step see Why can’t I copy text from a PDF?.
Common questions
How do I know if my PDF is scanned?
Try to select a word in your PDF reader. If you can only draw a box around it or selecting grabs the whole page as a picture, the page is an image and has no text in it.
What is a searchable PDF?
A scanned PDF with an invisible text layer added behind each page image. The page looks exactly the same, but search, copy and screen readers use the hidden text.
Is OCR text always correct?
No. Clean, straight scans of printed text come out nearly perfect. Faint copies, skewed pages, unusual fonts and handwriting cause mistakes. Check names, numbers and amounts against the scan.
Does OCR make the file bigger?
The text layer adds very little. Scanned PDFs are large because of the page images, which can be compressed separately.