Schema LawSign in with Google

How to Make a Scanned PDF Searchable

By Schema LawPublished Updated

To make a scanned PDF searchable, run it through OCR software and save the result as a searchable PDF. The software reads the picture of each page, works out the words, and stores them as invisible text in the same file. The pages look the same, but Ctrl+F now finds what is on them.

The work takes a few minutes. Trusting the result takes a little longer, because a search that returns nothing is only meaningful if the hidden text is right. This guide covers the conversion, a test you can run on any file, the reasons a search still comes up short, and the cases where a different export serves you better.

What makes a scanned PDF searchable?

A scanned PDF becomes searchable when it carries a text layer: a set of real characters stored in the file alongside the page pictures. Your PDF reader searches that layer, not the picture. The layer is normally invisible, so the page you see is still the scan.

A PDF page can hold several kinds of content at once. A scan holds one kind, a picture. A PDF saved from a word processor holds another, characters with fonts and positions. A searchable PDF holds both on the same page: the picture on top where you can see it, and characters that are drawn in an invisible mode so they never show.

Three things about that layer decide how useful it is.

  • Accuracy. The layer contains what the OCR software believed the page said. If it read "Harlow" as "Harlaw", a search for Harlow misses that page, and nothing on screen warns you.
  • Order. The characters are stored in a sequence. When the sequence follows the way a person reads the page, copying a paragraph gives you a paragraph. When it does not, copied text comes out shuffled even though single-word searches still work.
  • Position. Some tools place each word of the layer directly under the same word in the picture, so a search highlight lands on the right spot. Others record the text for the page without that word-by-word placement. Search finds the page either way, but the highlight may sit somewhere else on it.

The page picture and the text layer are independent. You can have a perfect picture with a poor layer, which is the usual state of a file that a copier "made searchable" on its own. If you have not yet confirmed that your file lacks a layer, the post on why you can't copy text from a PDF has a one-minute test.

Steps to add a text layer to a scan

Adding a text layer takes five steps: keep the original, check the file against the tool's limits, upload a copy, export a searchable PDF, and save it under a new name. The same sequence applies whether the file is a two-page letter or a long production volume.

  1. Set the original aside. Copy the file as you received it into a folder you do not work in. Everything after this happens to a copy.
  2. Check the file against the tool's limits. Schema Law accepts PDF, PNG and JPEG files up to 20 MB. Most plans also cap the pages in one document: 3 on the free plan, 250 on Solo and 1,000 on Team. Split a file that is over the cap at a document boundary, never in the middle of an exhibit.
  3. Upload and let the pages be read. Sign in, add the file, and wait until the document shows as ready. Open the parsed pages and skim two or three of them next to the scan. If a page came out empty or garbled, you want to know now.
  4. Export as Searchable PDF. Choose it from the export options for the document. It is available on every plan, the free one included, so you can try the whole process on a real three-page document at no cost.
  5. Rename and file it. Add a suffix such as _ocr or _searchable so nobody mistakes the copy for the file as produced. Store it next to the original.

A photo or a single-page image works the same way. Upload the PNG or JPEG, and the searchable PDF export gives you a one-page PDF holding that image with the recognized text behind it.

Two questions come up at this point. First, do you need to straighten or clean the scan beforehand? Usually not; try the file as it arrived and judge the output. Second, what about a file that already has a bad text layer from the copier? Run it anyway, then search the export for a name and a number you can see on the page, because the old layer may still be in the file alongside the new one.

If you scan the paper yourself, the settings you choose matter more than anything you do afterwards. The guide to digitizing law firm paper files covers resolution and color mode.

How do you confirm the PDF is really searchable?

Search the exported PDF for things you can see on the page and count the hits. A file is searchable in a useful sense only when ordinary words, proper names and numbers are all found, on late pages as well as early ones. Opening it and seeing that text can be selected proves very little.

Run this test on every file you intend to rely on. It takes about five minutes.

TestHow to run itA pass looks like
Common word, late pageGo to a page in the last third and search for a word in the middle of itThe reader reports a hit on that page
Proper nameSearch a party or witness surname you know appears several timesThe hit count is close to what you expect
NumberSearch a dollar amount, date or account number exactly as printedFound on the right page
Copy and pasteSelect all the text on one page, paste it into a blank documentReadable sentences in a sensible order
Hard pageRepeat the first test on the worst-looking page in the fileFound, or you now know that page is unreliable
Second readerOpen the file in a different PDF program and repeat one searchSame result

The number test deserves care. Search "18,450" and "18450" separately, because the layer holds whatever punctuation the software read. Do the same for dates written several ways.

The copy and paste test tells you about order and about accuracy at once. Read the pasted text against the page. A few wrong characters in a paragraph still leave the page usable for search. Whole lines missing, or two columns woven together, means the layer on that page cannot be trusted for anything but rough search.

In a searchable PDF exported from Schema Law, the hidden text for each page is written in reading order from the top of the page down, and is not pinned beneath each individual word. In practice your reader takes you to the correct page, and the highlight may not sit on the word itself. Look for the word on the page once the search has taken you there.

Record what you tested. A line in the file note such as "OCR copy, spot-checked pages 3, 41 and 88, page 57 poor" saves the next person from assuming a clean search means a clean file.

If you made a subpoena packet searchable, test the witness name, the return date and one document request. A subpoena duces tecum often attaches a schedule of what to bring. Search a distinctive item on that schedule so you know the attachment was read, and not only the face page.

Why search still misses words after OCR

Search misses a word after OCR when the hidden text differs from the visible text, even by one character. PDF search is literal. It matches the characters you type against the characters in the layer, so a single misread letter, a stray space or a line-break hyphen hides the word from you.

The common causes, roughly in the order you will meet them:

  • Misread characters. Faint print, small type and fax artifacts turn "m" into "rn" and "1" into "l". Names and numbers suffer most because the software has no context to fall back on.
  • Words split across lines. "Indemni-" at the end of one line and "fication" at the start of the next may be stored as two fragments. Search for a distinctive half of a long term as a backup.
  • Phrases broken by layout. A phrase that wraps across a column or page boundary is not contiguous in the layer. Search single words when a phrase search fails.
  • Text under a stamp or a signature. Ink over print damages the letters beneath it. The post on whether OCR can read stamps over text explains what to expect.
  • Handwriting. Margin notes and filled-in blanks are much harder than print, and a searchable layer may omit them or guess.
  • Characters the layer cannot hold. A hidden layer is written in a font, and a font covers a fixed set of characters. In Schema Law's searchable PDF, a character outside the layer font's set is left as a blank. For a document with names in a non-Latin script, search the plain text or Word export instead.
  • An older layer still present. If the file arrived with a poor text layer of its own, that text can remain in the exported file next to the new one, and a copy-and-paste may pick up both.

The practical defense is to search the way a careful reviewer does: several spellings, the unusual half of a name, a number with and without separators. Then treat "no results" as "not found by this search", not as "not in the document". When the misses are frequent, the problem is upstream, and the post on why OCR output is full of errors sorts scan problems from software problems.

Keeping the page image identical to the original

A properly made searchable PDF shows the same page pictures as the scan it came from. OCR needs only to read the image, not to change it. Whether your tool leaves the image alone is a setting or a design choice, so check it once before you depend on it.

Some OCR programs offer to improve the page while they work: straightening it, removing specks, shrinking the file by compressing the pictures harder, or replacing the scanned letters with clean synthetic type. Each of those produces a page that is no longer the page you received. For internal reading that may be welcome. For an exhibit, a production or anything whose appearance might later be questioned, it is the wrong choice. Stamps, initials, handwriting and marginal marks are part of the document.

Schema Law builds its searchable PDF from the file you uploaded and adds the invisible text to each page. It does not redraw the pages. That matches how the format is described on the export formats section of the homepage: the original image with a selectable text layer.

Three habits keep you safe with any tool:

  • Never overwrite. The file as received stays untouched, and the searchable copy has its own name.
  • Expect the file itself to differ. Adding a layer changes the file's size and its hash value, even when every page looks the same. If your matter tracks hash values, the value belongs to the original, and the searchable copy is a working copy.
  • Compare a page by eye. Open the original and the export side by side at 200% on a page with a stamp or signature. They should be indistinguishable.

Courts that accept or require text-searchable filings have their own rules about scanned exhibits and file size. Those are covered in the post on searchable PDFs for court filing, and they vary enough that you should read your own court's.

When a searchable PDF is the wrong export

A searchable PDF is the right export when you want to keep the document's appearance and find things in it. It is the wrong one when you need to change the words, compute with the numbers, or feed the content to another program. The text layer exists for searching, and it makes poor source material for editing.

Use this as a guide:

What you need to doBetter exportWhy
Revise the language or draft from itWordParagraphs, headings and tables you can edit; see converting a scanned PDF to Word
Add up a schedule or sort a ledgerExcelEach table lands on its own worksheet; see scanned PDF to Excel
Paste a passage into a briefPlain textClean characters with no hidden formatting; see scanned PDF to text
Load content into a database or scriptJSON or CSVStructured output a program can read
File, produce, archive or read the documentSearchable PDFThe page stays as it was

You do not have to choose once. A document you have uploaded can be exported again in another format, so a common pattern is a searchable PDF for the file and a Word or text export for the passage you are working on. Every plan exports all eight formats, and the pricing page shows each plan's page limits.

One more case: if all you need is a single quotation, do not convert a 400-page volume to get it. Pull the pages you need, convert those, and follow the checks in the guide to quoting text from a scanned PDF.

All posts in Converting scans