Blog
Text searchable PDFs: the rule, the test and the fix
Courts require filings to be text searchable, and a scan never is. How to spot the image-only files in a 200 exhibit bundle before the clerk does.
A text searchable PDF contains real characters that a computer can find. A scan does not: it is a photograph of a page, and to a computer it is a picture with nothing in it. Courts require the first and reject the second, and the difference is invisible on screen, which is why this catches people out. The fix is OCR, and the check takes three seconds per file.
The rule
It is not one rule, it is dozens of local ones that all say the same thing. The Second Circuit puts it as plainly as anyone: “All PDFs submitted to the Court must be text-searchable”, under its Local Rules 25.1(e) and 25.2(b)(3). District courts carry equivalent language in their CM/ECF administrative procedures. The usual shape of it is that main documents and pleadings must be text searchable, and attachments and exhibits should be wherever possible, with an acknowledgement that a photograph or a map never will be.
Check your own court. The requirement is close to universal but the wording, and how strictly the clerk’s office applies it to exhibits, is not.
The reason behind the rule is worth knowing, because it tells you what a marginal case will be judged against. A text searchable docket can be searched, indexed and quoted. A judge’s clerk can find the paragraph. A screen reader can read it to a party who is blind. An image-only filing does none of that, and it is opaque to the court’s own systems as much as to the other side.
Why word processor files pass and scans fail
There are three ways a PDF gets made, and only one of them produces an image-only file.
Exported from Word, or printed to PDF from any program. The program knows what the characters are, so it writes them into the file along with the instructions for drawing them. This is text searchable automatically. You do not have to do anything.
Scanned from paper. The scanner produces an image of the page and wraps it in a PDF. There are no characters anywhere in the file. It looks identical on screen and it is a completely different kind of object.
Scanned from paper, then OCR’d. Optical character recognition looks at the image, works out what the letters are, and writes a layer of invisible text behind the picture at the matching positions. The image is what you see. The invisible text is what gets searched. This is what the rule is asking for.
The third case is the one everyone means by “make it searchable”. It is an extra step that does not happen on its own.
The three second test
Open the PDF and press Ctrl+F or Cmd+F. Search for a word you can plainly see on the page.
- Found: there is a text layer. It passes.
- Not found: there is nothing to find. It is image only.
The Second Circuit suggests a second check that is even quicker: try to select the text with your cursor. If the whole page turns blue as a single block rather than individual words highlighting, you are selecting an image, not text.
We wrote up why the two look identical and how to tell them apart in more detail in how to tell if a PDF is real text or a photo of text.
The real problem is not one file, it is two hundred
Nobody fails this test on their own brief. The brief came out of Word. What fails is exhibit 47, which the client photographed, and exhibit 112, which came from opposing counsel as a scan of a scan, and the three pages somebody inserted from a printout halfway through a 300 page production.
Checking two hundred files by hand with Ctrl+F is an hour of work and the sort of task where attention fails in the middle. A faster pass is to run each file through something that reports whether a text layer exists at all, and only open the ones that come back empty.
That is what our converter does as a side effect of its actual job. It reads the text layer and, when it finds nothing, tells you the file is image only rather than handing you a blank page. It runs entirely in your browser, which for a discovery production is not a small detail: nothing about the bundle leaves the machine.
It does not OCR. Nothing that runs comfortably in a browser tab does a good job of that yet. It finds the files that need it, which is the part that takes the time.
Once you have found them
For fixing, the usual routes, cheapest first:
- Your scanner’s own software. Most multifunction office scanners have an OCR setting that is off by default. Turning it on stops the problem happening again, which is worth more than fixing this batch.
- Adobe Acrobat, Tools then Text Recognition. It will run over multiple files in one pass, which is the setting you want for a bundle.
- OCRmyPDF, a free open source tool that adds a text layer to a scanned PDF without touching the image. It runs on your own machine, handles a whole directory in one command, and is the right answer for anyone with a large back catalogue and a command line.
Three things that go wrong after OCR
OCR is not accurate, it is approximate. It misreads. It is worse on poor scans, handwriting, stamps, faint fax copies and anything at an angle. The text layer can therefore disagree with the visible page. Since the text layer is what gets searched, an error means a document that is technically searchable and practically unfindable by the term that matters. Spot check the words you would search for: names, case numbers, dates.
The order of operations matters for redaction. OCR writes real text behind the image. If you OCR a document and then draw a black rectangle over a name, the rectangle is a shape on top and the OCR’d name is still in the file, still selectable, still returned by any extraction tool. Redact with a tool that removes content, and verify afterwards by trying to select the redacted area. This is the single most expensive mistake in this whole area and it has happened in real filings.
OCR does not clean the metadata. The file still carries whatever the scanner and the OCR software wrote into it, including device names and timestamps. If the document is heading for a public docket, see what leaves with a court filing.
A note on PDF/A
Some courts and most archives ask for PDF/A, which is a restricted version of PDF designed to still be readable in fifty years: fonts embedded, no external dependencies, no encryption. PDF/A and text searchable are different requirements that often travel together. A PDF/A file can still be an image of a page. Meeting one does not meet the other, so check for both if your court asks for both.
Further reading
- Making a PDF text-searchable, United States Court of Appeals for the Second Circuit.
- Creating and filing documents, CM/ECF user manual, District of Oregon, on the three ways a PDF gets made.
- CM/ECF administrative procedures, District of Massachusetts, as an example of how a district words the requirement.
- OCRmyPDF documentation, for doing this in bulk on your own machine.