Schema LawSign in with Google

Convert Scanned PDF to Searchable PDF: Options to Set

By Schema LawPublished Updated

When you convert a scanned PDF to a searchable PDF, five options decide what you get: the recognition language, whether pages are straightened or rotated, whether the picture is cleaned, how hard the images are compressed, and whether the output keeps the scan or rebuilds the page. Set each one by what the file is for.

Some converters show all five on one settings screen. Others show none and make the choices for you. Either way the choices get made, and each one changes either the hidden text or the picture a reader sees. This guide takes them one at a time, says what each can cost you in a legal file, and ends with a table of settings by purpose.

With the settings chosen, search the output for a contract clause heading, a medical provider, and an order title you can see on the scan. Read each hit against the page image at high zoom. Cleanup that fades a stamp can also drop jurisdiction or venue from the text while a faint mark remains on the picture.

Which options does a scanned-to-searchable PDF conversion ask you to set?

A conversion from an image-only PDF to a searchable one can ask for five things: the language of the document, page straightening and rotation, cleanup of the picture, image resolution and compression, and the output build. The first affects only the hidden text. The other four can change the page a reader sees.

That split is the useful way to sort any settings screen. Go down the list and ask of each control: does this touch the text, the picture, or both?

OptionWhat it changesThe question to settle first
Recognition languageThe hidden textWhich languages appear in this document?
Rotation of sideways pagesThe picture, or only how it is displayedShould every page open upright?
Straightening (deskew)The pictureMay the page image be redrawn at a new angle?
Cleanup (specks, background)The picture, or only the copy the reader engine seesCould a faint mark be removed as noise?
Downsampling and compressionThe pictureDoes small size matter more than fine detail?
Output buildEverything visibleMust the page still show the paper?
Pages that already have textThe existing text layerKeep it, replace it, or stop?

The last row is easy to forget. A scanned PDF from a copier or from another firm may already carry a text layer of some kind. Decide whether the conversion should keep that text or replace it before you start, because a tool can treat such a file in several ways. The OCRmyPDF project, for one, documents that by default it will "exit without modifying the PDF" when a page seems to have text, in its notes on when OCR is skipped.

When the screen shows no options at all

A converter with no settings has still chosen. Find out what it chose by reading its documentation and by running one page through it. Schema Law's homepage describes its searchable PDF export in one line, "Your original file with a hidden text layer, so search finds the page", and the export formats section is where that description sits. Whatever tool you use, the test is the same: convert a page with a stamp, a signature and some small print, and compare it with the original at high zoom.

Two housekeeping steps belong before any of this. Fix the file's page order, remove stray blanks and deal with comments first, as set out in the guide to tidying a PDF before OCR. And if you are not sure what a text layer is or how a searchable PDF is put together, the guide to making a scanned PDF searchable explains the layer and the basic procedure.

Recognition language and why the wrong one spoils a searchable PDF

The recognition language tells the software which alphabet, accents and word patterns to expect. Set it to every language that appears in the document. With the wrong language, accented letters are replaced by lookalikes and foreign words are bent toward the nearest word the software knows, so searches for those names and terms find nothing.

Tools differ in how they handle this, so read the documentation for yours. OCRmyPDF's cookbook is blunt about its own default: it "assumes the document is in English unless told otherwise", and "OCR quality may be poor if the wrong language is used." The same page shows that more than one language can be named for a single file. Other tools detect the language themselves or do not expose the setting. If yours has a language list, do not leave it on the default without looking.

What a language mistake looks like in the file

The picture is unaffected, which is why this error goes unnoticed. The damage is all in the hidden text:

  • Accents and special letters drop out. "Peña" is stored as "Pena" or "Pefia". "Müller" becomes "Muller" or "Miiller". A search typed with the correct spelling misses the page.
  • Words are pulled toward the wrong vocabulary. The post on whether OCR uses a dictionary explains how word lists can change what is stored.
  • A different script becomes nonsense. A paragraph in Cyrillic, Greek or Arabic read as English produces strings of unrelated Latin letters.

Skim the document for anything that is not English before you convert it. The places to look are party names, addresses, notarial certificates, apostilles, attached foreign-language originals behind a certified translation, and quoted contract terms.

Take a fictional example. A 38-page bundle in the matter of Ostrava Tooling s.r.o. holds an English supply agreement, a two-page Czech corporate extract and a German delivery note. With English alone selected, the agreement converts well and the Czech and German pages are stored with their háčeks and umlauts stripped or mangled. Searching the bundle for the director's surname, Dvořák, finds the English pages where a typist wrote "Dvorak" and misses the extract, the one page that proves his authority to sign.

Three ways to handle a bundle like that:

  1. Select all three languages, if the tool allows several at once.
  2. Split the bundle at document boundaries, convert each part with its own language, and file the parts together.
  3. Convert with one language and note in the file that pages 31 to 38 are unreliable for search.

Whichever you choose, test it by searching for a name with an accent in it, typed correctly.

Should the conversion straighten, rotate or clean the scanned pages?

Rotate pages that are sideways or upside down, because nobody can read them otherwise. Be careful with straightening and cleanup. Both can help recognition, and both can redraw the page picture. For a file whose appearance matters, prefer cleanup that feeds only the reader engine, or none.

These three corrections are different in kind, and it helps to keep them apart.

Rotation

Rotation turns a page by a quarter or half turn so the text is upright. A PDF can record this as a display instruction without redrawing the image. The risk is a wrong guess: a page of mostly table lines, a signature page or a sideways spreadsheet print can be turned the wrong way. Whether to rotate by hand first or let the tool decide is covered in the guide to preparing a PDF for OCR.

Straightening

Straightening, also called deskew, corrects a page that went through the feeder a few degrees off. To do it, software has to resample the picture at a new angle. The words become easier to recognize, and the page is no longer pixel for pixel the page you received. The post on how to OCR a crooked scan deals with tilted pages in detail.

Cleanup

Cleanup removes specks, shadows, punch-hole marks and background tone. What happens inside the software is the subject of the post on OCR preprocessing. The decision for you is narrower: where does the cleaned picture go?

Some tools separate two kinds of cleanup. OCRmyPDF's cookbook describes one option that cleans pages before OCR "but does not alter the final output", and a second that cleans the page and "inserts the page into the final output", with the advice that "You will want to review each page to ensure that unpaper did not remove something important." The same page warns that its background removal "should not be used on documents that contain color photos as it may remove them." That is one tool's documentation, quoted because it states the trade plainly.

CorrectionBenefitWhat it can cost
RotateUpright pagesA wrong turn on a page with little text
StraightenBetter recognition of tilted linesA resampled image; softer fine print
Clean for recognition onlyFewer false characters from specksNothing visible
Clean the final pageA tidier pageFaint initials, pencil notes, light stamps, a dot that was a decimal point

A mark the software treats as noise may be a date stamp in pale ink or a tick beside a clause. If cleanup changes the final page, compare every page that carries handwriting or a stamp with the original. The method for showing that the pictures match belongs to the post on whether OCR changes the original PDF.

Image downsampling and compression choices during conversion

Downsampling lowers the resolution of each page picture, and compression changes how the picture is stored. Both shrink the file. Both act on the picture you see, and lossy settings discard detail for good. Leave the images as they are unless a size limit forces a change, and make that change on a copy.

A conversion does not need to touch the pictures at all. Recognition reads them, and the text is added alongside. Tools offer to shrink the images at this point because the file is being rewritten anyway.

Three controls appear under different names:

  • Resolution or downsampling. "Reduce to 150 dpi" throws away pixels. How much resolution recognition needs is the subject of the post on the best DPI for OCR.
  • Compression or quality. A slider from high quality to small size. The methods behind the slider, and which of them lose detail, are explained in the post on lossy versus lossless compression.
  • Color conversion. An option to turn color or gray pages into pure black and white. It makes a small file and can erase a highlighter mark, a colored stamp or a faint line.

Read what your tool does by default

Defaults matter here because they act without being asked. OCRmyPDF's page on PDF optimization gives a clear example of how to read one. It says that with its plain PDF output type "there are no lossy optimizations", that under its lossy optimizations "The quality of JPEGs may be lowered, on the assumption that a lower quality image may be suitable for storage after OCR", and that the tool "might still increase the overall file size, since it must embed information about the recognized text". Look for the equivalent statements in your own tool's documentation.

A size check you can run in two minutes

  1. Note the size of the scan before conversion and of the searchable copy after it.
  2. If the copy is slightly larger, the pictures were probably left alone and the growth is the text.
  3. If the copy is much smaller, the pictures were recompressed or downsampled. Open a page with small print and a signature at 400% in both files and compare.
  4. Write the two sizes in the file note.

If a court portal or an email limit is the reason you need a smaller file, shrink a copy of the searchable PDF after you have checked it, and keep the full-quality one. The post on searchable PDF file size covers shrinking without losing the text.

For a legal record, choose the output that keeps the scanned picture and hides the recognized text with it. A rebuilt page replaces the scan with type set by the software, so every misreading becomes part of what the reader sees. Use rebuilt output only for copies you will read or edit yourself.

The two builds are compared in full, with a way to tell which one you hold, in the post on the two builds of searchable PDF. What follows is only the choice.

Settings screens give these builds different names. Look for wording along these lines and work out which is which from the description and a test page:

Wording on the screenWhich build it describes
"Searchable image", "text under image", "image with hidden text"Keep-the-picture
"Editable text", "formatted text and graphics", "text over image"Rebuilt, wholly or partly
A setting that mentions replacing scanned letters with fontsRebuilt

Questions that settle the choice

  • Will anyone outside the office see this file? Keep the picture.
  • Does the page carry a signature, stamp, seal, initials or handwriting? Keep the picture.
  • Could someone later ask whether this is what the paper looked like? Keep the picture, and be ready to show it. The post on whether OCR changes the original PDF explains how to demonstrate that the picture was not altered.
  • Do you only want a small, crisp reading copy for your own use? Rebuilt output is acceptable, labeled as a working copy.

A third option appears on some screens: PDF/A, an archival form of PDF. It is a file standard and can be combined with either build. The post on what PDF/A is explains the parts and conformance levels. Do not pick it by habit. OCRmyPDF's optimization page notes that when its PDF/A output is built with Ghostscript, that program "will optimize some images by converting them to JPEG, which are lossy." A setting that sounds as if it concerns only the file format can change the pictures too.

Which conversion settings suit filing, production and the closed file?

For a court filing, keep the picture and meet the court's size and format rules. For a production, follow the agreed specification and change nothing visible. For a closed file, keep the picture at full quality. Only an internal working copy can take the corrections and compression that alter the page.

PurposeLanguageRotateStraighten and cleanImagesBuild
Court filingAll languages presentYesOnly if the final page is unchanged, unless the page is unreadable without itAs scanned; shrink a copy only to meet a stated limitKeep-the-picture; PDF/A only where your court asks
Production to another partyAll languages presentAs the specification saysNoAs scannedAs the specification says
Closed file or archiveAll languages presentYesNo change to the final pageAs scanned, full qualityKeep-the-picture; PDF/A if firm policy requires
Internal working copyThe languages you will search inYesWhatever helpsSmaller is fineEither, labeled as a working copy

These rows are starting points, and three of them depend on rules you have to read yourself.

Filing. Format, size and searchability requirements differ from court to court. The post on searchable PDFs for court filing covers that subject, including one court's guideline that tells filers not to use OCR software on scans. Read your court's own procedures before you set anything.

Production. The form of production is set by the rules, the requests and any agreement between the parties. The post on making a document production searchable covers the form question. Where a protocol asks for images with separate text files, a searchable PDF may be the wrong deliverable altogether.

The closed file. Your firm's retention policy decides the format. Keep the scan as received next to the searchable copy, with the conversion date and tool noted.

A settings note for the file

Write the choices down once per matter, so that every conversion in it is made the same way:

  • Languages selected
  • Rotation: on or off
  • Straightening and cleanup: off, recognition only, or applied to the page
  • Image handling: unchanged, or the resolution and quality chosen
  • Output build, and whether PDF/A
  • What was done with pages that already had text
  • Who checked the first converted file, and on which pages

If you use Schema Law for the conversion, the limits to plan around are the upload size, 20 MB per file, and the pages per document on your plan, which the pricing page lists. Run one representative file first, check it against this note, and then convert the rest.

All posts in Searchable PDFs