How to Check if a PDF Is Searchable on Every Page
By Schema LawPublished Updated
To check if a PDF is searchable on every page, test it in several places and not only at the front: search for a word you can see on an early page, a middle page and the last page, then export the text and look for empty pages. For a set, repeat per file and record the result.
A file can answer "is this searchable?" with yes on page one and no on page forty. A set can do the same across its files. The checks here are built for that: they look through a file and across a folder, and they end in a record somebody else can rely on.
On the pages you chose, search a party name, a Bates number, and an exhibit label, and include a page in the last tenth of the file. Compare every hit with the page image. Where the set includes testimony, add a deposition line and an affidavit caption. A folder that finds the complaint in the first file and misses that party's name in a later one is not ready.
How do you check if a PDF is searchable beyond its first page?
Search for a word you can see on pages spread through the file, including the last page and any page that looks different from its neighbours. Then pull the text out of the whole file and look for pages that produced nothing. A test on the first page tells you about the first page.
The basic test for one file, with its checks on names, numbers and pasted text, is set out in the guide to confirming a PDF is really searchable. What follows adds the dimension that test leaves to you: where in the file to run it.
Choosing the pages
Pick pages by where the file is likely to change character, not at random.
- The first, the last and one from the middle. Three points give a floor.
- Every page where the look changes. Scroll the thumbnail panel. Typed pages are bright white with even margins. Scanned pages are slightly grey, slightly tilted, or have a dark edge. Each change of look is a likely change of source.
- The first page behind every exhibit tab or cover sheet. An exhibit can be a scan bound into a typed filing.
- The worst-looking page. A faint fax or a skewed photocopy is where recognition is weakest.
- Any sideways page. Rotated tables and landscape exhibits can be missed.
The whole-file sweep
Spot tests sample. A sweep covers every page at once.
- Search the file for a very common word, such as "the" or "of".
- Open the results list, which shows hits page by page.
- Scroll the list and watch the page numbers. They should run through the file with only small gaps.
- Write down every stretch of pages with no hit at all.
A gap of one page may be a blank or a photograph. A gap of twenty is a block of pages with no text. Go to each gap and look at what is there.
A second sweep is to export or copy the full text into a plain text file and scroll through it. Empty stretches and runs of nonsense both stand out. The post on how to see the text layer in a PDF covers reading the hidden text directly.
A PDF that passes the search test on page one and fails on page forty
A PDF passes on page one and fails on page forty when it was assembled from sources of different kinds. A typed motion or cover letter sits in front of scanned exhibits, and only the typed pages carry text. The file is partly searchable, and a search of it gives partial answers.
Take a 96-page summary judgment filing served by the fictional firm Aldous Reyne on behalf of Castellan Supply. Tested through the file, it looks like this:
| Pages | Content | How it was made | Searchable? |
|---|---|---|---|
| 1 to 22 | Motion and memorandum | Saved from a word processor | Yes |
| 23 to 25 | Declaration with ink signature | Printed, signed, scanned | No |
| 26 to 39 | Exhibit A, supply contract | Typed PDF from the client | Yes |
| 40 to 71 | Exhibit B, delivery tickets | Scanned in a batch | No |
| 72 to 80 | Exhibit C, email chain | Printed to PDF from a mail program | Yes |
| 81 to 96 | Exhibit D, deposition excerpts | Scanned with the copier's own OCR | Yes, poorly |
Forty-five of the 96 pages are fully searchable, sixteen are doubtful and thirty-five are not searchable at all. A search for the driver's name finds it in the memorandum and misses every delivery ticket that bears it.
Finding the boundaries
When a late page fails, find where the failure starts by halving the distance. Page 1 passes and page 40 fails, so test page 20. It passes, so test page 30. It passes, so test 35, then 38, then 39. Five tests place the boundary between pages 39 and 40. Then walk forward the same way to find where searchable pages resume.
Halving finds one boundary. It stepped straight over the three-page declaration at pages 23 to 25, because pages 20 and 30 both passed. A short unsearchable insert between two typed ranges is found by a common-word sweep of the whole file, so run the sweep as well.
Record the map as page ranges, as in the table. The ranges tell you which pages to send for OCR and which to leave alone. Running recognition over the typed ranges as well can do harm, as the section on PDF documents that are part typed and part scanned explains.
The last row matters as much as the failures. Pages 81 to 96 pass a simple test, because words select and some searches hit. They belong in the map with their own label, because a layer that exists is not the same as a layer that is right.
Checking a whole folder of PDFs for searchability in one sitting
Work through the folder in three passes: sort the files by what you can learn without opening them, run one search across the whole folder for a word every file should contain, then open only the files the first two passes left in doubt. Each pass narrows the list the next one has to handle.
Pass one: size per page
Add a page-count column to the folder view if your system offers one, or note the counts as you go. Divide each file's size by its page count.
- A small figure, a few kilobytes per page up to the low tens, points to typed text.
- A figure in the high tens or hundreds of kilobytes per page points to page pictures, which may or may not have text behind them.
Treat the figure as a pointer and not a verdict. Embedded fonts and a few photographs raise the number for a typed file, and hard compression lowers it for a scan.
This pass does not tell you a scan is searchable. It tells you which files are scans, and so which ones the question applies to.
Pass two: one search across the folder
Use the multi-file search in your PDF reader or document system and search the folder for a common word. Read the results by file.
| Result for a file | What it means | Next step |
|---|---|---|
| No hits | No text layer anywhere | Mark as Fail; send for OCR |
| Hits on about as many pages as the file has | Text throughout | Spot test in pass three |
| Hits on far fewer pages than the file has | Partly searchable | Map the ranges |
| File missing from the results altogether | The search did not read it | Open it by hand |
The last row is a real case. A folder search may rely on an index that has not caught up, or may skip certain files. The post on PDF search not working separates faults in the program from faults in the file, and the post on searching across many PDFs covers folder and index search in full.
Pass three: open what is left
Open each file that pass two marked partial or passed, and run the page tests: first, middle, last and each change of look. Files that passed pass two cleanly need the least time. Partial files need a page map.
For a set of several hundred files, litigation-support staff can script the first two passes with a text-extraction utility that reports characters per page for each file. Ask for a list with one row per file showing the page count and the number of pages with fewer than, say, fifty characters. That list is the same triage, produced by a machine.
What does a page with a text layer but no real words look like?
It looks normal on screen and selects like text, but what you copy from it is not language: strings of symbols, single letters scattered among spaces, the same few characters repeated, or only a header and a page number. A quick select test passes such a page, and a real search never finds it.
Paste is the test that exposes a junk layer. Copy the whole page into a plain text editor and read what arrives.
| What the paste shows | Likely cause | Searchable in any useful sense? |
|---|---|---|
Tl1e pa1iies agrcc tl1at | Recognition ran on a poor picture | Common words only; names and numbers unreliable |
□□□□ □□□ □□□□□□ or stray symbols | Font with no character map | No |
t h e p a r t i e s | Letters stored singly with spaces between | No, unless you search letter by letter |
| Accented or foreign-looking words where English is printed | Recognition set to the wrong language | Patchy |
Only CASTELLAN000412 and nothing else | A numbering stamp was added to an image page | Only for the stamp |
| Only a fax header line or a footer | Text added by a machine on the way; body never recognized | Only for that line |
| Words in an order that makes no sense | Columns or tables read across | Single words yes, phrases no |
The stamp row deserves attention in litigation files. A page-numbering tool writes its number as real text. If it stamps a set of scanned pages that never went through OCR, every page gains exactly one searchable string. "Select all" highlights something, a search for the prefix returns a hit on every page, and the documents themselves remain pictures.
Three quick signs separate a junk layer from a sound one without reading the paste closely:
- Length. A full page of print should paste as a full page of text. Two lines from a dense page is a failure.
- A long ordinary word. Search the page for a word of ten letters or more that you can see on it. Long words are the ones a poor layer breaks.
- A number. Search a figure exactly as printed.
Judging how far recognized text has drifted from the page is its own subject; the post on why OCR output is full of errors covers comparing the two. The font case is described under other reasons copying fails.
How many pages should you test before trusting a searchable set?
No fixed number fits every set, so tie the sample to how the set was made and to what depends on it. Test every file at least once, test more pages wherever the source or the scan quality changes, and test every page of the documents your matter turns on.
A sample can show that a problem exists. It cannot show that none does. Ten clean pages out of a thousand say that the process works on pages like those ten. So choose pages that differ from one another, and widen the test the moment one fails.
A working scheme, offered as a starting point and not as a standard:
| Situation | Test at least |
|---|---|
| One file, one source, even scan quality | First, middle and last page |
| One file assembled from several sources | First and last page of each source |
| A set scanned in one batch on one machine | Three pages in every file, plus the worst-looking page in the set |
| A set from several custodians, machines or dates | Three pages per file, and five extra pages per source |
| Files the copier or scanner "made searchable" itself | Paste test on three pages per file, not only a search |
| Key documents: the contract, the policy, the record a witness will be asked about | Every page, by text export read against the image |
| A delivery from an outside scanning service | What your order with the service says, and no less than the other rows of this table |
When to widen
- One failed page in a file. Sweep the whole file with a common-word search and map it.
- Failures in two or more files from one source. Treat every file from that source as untested, whatever the first samples showed.
- A junk layer anywhere. Switch from search tests to paste tests for the rest of that source, because search alone will pass junk.
- No failures. Stop at the planned sample and record what it was. Do not describe the set as fully verified; describe what you tested.
How much error a searchable layer can carry depends on the task. A set you will only browse tolerates more than a set whose "no results" will be reported to a partner as "nothing there". Decide which you have before you choose the sample.
Recording which files passed the searchability check
Keep a sheet with one row per file: its name, its page count, the pages you tested, the terms you searched, the result, and what was done about any failure. The sheet tells the next person which searches of the set can be relied on and which files were never confirmed.
A spreadsheet in the matter folder is enough. Use fixed words in the result column so the sheet can be filtered.
| File | Pages | Pages tested | Terms searched | Result | Action | By / date |
|---|---|---|---|---|---|---|
Castellan_MSJ_filing.pdf | 96 | 1, 20, 30, 35, 38, 39, 40, 71, 72, 96 | "Castellan", "the" | Partial: 23-25 and 40-71 no text | Ranges sent for OCR | RT / 8 Oct |
Castellan_tickets_2023.pdf | 212 | 1, 106, 212, 57 | "delivered", "4,250.00" | Pass | None | RT / 8 Oct |
Castellan_depo_Imre.pdf | 16 | 1, 8, 16 (paste) | "warehouse", "Imre" | Junk layer | OCR again from the scan | RT / 8 Oct |
Castellan_emails_export.pdf | 9 | 1, 5, 9 | "invoice" | Pass | None | RT / 8 Oct |
scan_0931.pdf | 4 | 1, 4 | "the" | Fail: no text | Sent for OCR; rename | RT / 8 Oct |
Four result words cover what you will meet:
- Pass. Every tested page found its term and pasted as readable text.
- Partial. Some ranges have text and some do not. Give the ranges.
- Junk layer. Text is present and is not usable. Say which test showed it.
- Fail. No text layer.
Add a row each time a file is replaced. When the OCR copy of scan_0931.pdf comes back, it is a new file with a new name, and it gets its own row and its own test. A file that failed and was fixed has two rows, which is the history you want.
For the files that fail, Schema Law takes a PDF, PNG or JPEG of up to 20 MB, shows the parsed pages on screen so you can read them against the scan, and exports a searchable PDF. The homepage says recognition is strongest on clean print and that nothing marks a passage as uncertain, which is the reason the returned file goes back through this sheet like any other. The steps from upload to export are on the homepage.
Put the sheet's location in the matter's file note. When someone later reports that a search of the set found nothing, the first question is whether the search covered files marked Pass, and the sheet answers it.