Turning a Scanned PDF Into Searchable Text With OCR

Why scanned PDFs can't be searched or copied, how OCR fixes that, and the scanning habits that make recognition far more accurate.

Updated: 6 min read

You press Ctrl+F in a PDF, type a word you can clearly see on the page, and get zero results. Or you try to copy a paragraph and the whole page gets selected as one block. Both are signs that you are looking at a scan: a picture of text rather than text itself. Optical character recognition, or OCR, is how you turn that picture back into words a computer can work with.

Why a scanned PDF behaves like a photo

A PDF created from a word processor stores each character as a character, along with the font and position it should be drawn in. That is why you can search it, copy from it and have a screen reader read it aloud.

A scanner or a phone camera does something completely different. It records a grid of colored dots. The result may be wrapped in a PDF, but inside there is just one image per page. To the software, the letter A on that page is no different from a coffee stain next to it. Nothing in the file says that a word is there at all.

This matters more than it might seem. Unsearchable archives are hard to use, you cannot paste a quote from them into an email, translation tools have nothing to work with, and people who rely on screen readers get nothing but silence.

What OCR actually does

OCR software looks at the page image, finds areas that contain text, splits them into lines and words, and then guesses which characters the shapes represent. Modern engines also use a dictionary and language model for the chosen language, which is why telling them what language the document is in makes such a difference: knowing that a word is Turkish or German helps the engine pick between visually similar letters and handle accents correctly.

The useful output is usually a searchable PDF. The page still looks exactly like the original scan, but an invisible text layer is placed underneath, word by word, in the right positions. When you search or select, you are working with that hidden layer. The alternative is plain text, which is handy when you only need the words and not the layout.

How to get good recognition results

OCR quality depends far more on the input than on any setting. A clean, straight, well-lit page is read almost perfectly; a crooked, blurry photo taken under a desk lamp may come back full of errors. Here is what helps most:

  • Resolution: For normal body text, around 300 dpi is the usual sweet spot. Much lower and small letters lose their shape; much higher mostly makes the file bigger. Very small print, such as footnotes, can benefit from going higher.
  • Contrast: Dark text on a light, even background works best. Grayscale is often better than pure black-and-white for faint or uneven originals, because thresholding can break thin strokes apart.
  • Straight pages: Place the page squarely on the glass or hold the phone parallel to the paper. Tilted or curved lines, such as those near the spine of a thick book, are a common cause of errors.
  • Even lighting: Shadows from your hand or phone, and glare from glossy paper, hide parts of letters. Daylight or a scanning app that flattens the page helps.
  • Clean originals: Highlighter, stamps over text, handwriting in the margins and coffee rings all confuse the engine. Use the cleanest copy you have.
  • The right language: Always choose the language the document is written in. If it mixes languages, pick the one most of the text is in.

Running OCR in vupdf

The vupdf OCR tool accepts either one PDF or one or more JPG or PNG images; images are combined into a single document in the order you upload them. You choose the document language from a list of several dozen languages, and then decide what you want back:

  • Searchable PDF, which keeps every page looking the way it did and adds the invisible text layer described above.
  • Plain text (.txt), with a heading line before each page, for when you just need the words.

You can read all pages or only some of them, and if you only care about a particular part, such as an address block or a table, you can draw rectangles over those areas and only they are read. When you choose plain text, the recognized text is shown on screen so you can correct mistakes before copying or downloading it.

Pages that already contain real, selectable text are skipped automatically. Running OCR over them would place a second copy of every word on top of the first, so searching and copying would return everything twice. If none of the selected pages needed OCR, the tool tells you and returns the file unchanged.

Open OCR - Convert to TextExtract searchable text from scanned documents.

The recognition runs on vupdf’s own servers rather than through an outside AI service, and uploaded files are deleted once your result has been delivered.

Checking the output

OCR is very good but not perfect, so a quick check is worthwhile, especially for documents where a single wrong digit matters.

  1. Open the searchable PDF and use the search function for a few words you can see on different pages. If they are found and highlighted in the right place, the text layer is working.
  2. Select and copy a paragraph into a text editor. Look for typical OCR slips: the digit 1 instead of a lowercase l, 0 instead of O, rn read as m, or missing accents.
  3. Pay special attention to numbers, names, IBANs, dates and amounts. These have no dictionary to fall back on, so the engine cannot use context to correct them.
  4. If many errors appear on one page, look at that page’s image. A blurry or skewed scan is usually the reason, and rescanning that single page often fixes it.

From searchable text to an editable document

A searchable PDF is ideal for archiving, searching and quoting. If you need to rewrite the content, the next step is usually converting it to Word. The vupdf PDF to Word tool does not read scanned pages on its own: they come through as pictures, and a file with no text at all is refused with a pointer to the OCR tool. Running OCR first and then converting the searchable PDF gives the converter real text to work with.

Open PDF to WordConvert your PDF files into an editable Word document.

Key takeaways

A scanned page is an image, which is why it cannot be searched or copied. OCR reads that image and adds the words back, and its accuracy depends mostly on what you give it: a straight, sharp, evenly lit page at a sensible resolution, and the correct language setting. Spend a minute checking numbers and names in the result, and keep the original scan in case you need to look at the source again.

Tools in this guide

All guides →