Prepare a PDF for OCR: What to Fix Before You Convert
By Schema LawPublished Updated
To prepare a PDF for OCR, work on a copy and fix the file, not the picture: turn sideways pages upright, decide which blank, duplicate and separator pages stay, get protection lifted by someone entitled to lift it, pull documents out of a portfolio, and settle what happens to comments. Then check size and page count.
None of this is image cleanup. Whether the print is sharp enough to read is a separate question with its own post on OCR for a low-quality PDF. The housekeeping here takes a file that is legible and makes sure the conversion sees every page once, the right way up, with nothing standing between the tool and the content.
Before you rotate or remove pages, write down a pleading caption, a Bates number, an exhibit sticker, and a discovery heading you will search afterward. Run recognition on the prepared copy and search those four. Compare each hit with the page image. A summons that was sideways should now be found upright. A separator you removed should not appear.
What should you fix in a PDF before running OCR?
Fix six things, in this order: make a working copy, confirm the page count and order, correct the orientation of turned pages, decide on blank, duplicate and separator pages, clear any protection or packaging that stops the tool opening the pages, and decide what to do with comments. Leave the image quality for a separate judgment.
| Housekeeping item | Why it matters to OCR | Time to check |
|---|---|---|
| Working copy | Every later change happens to the copy, never to the file as received | Before anything else |
| Page count and order | Text comes out in file order; a missing or misplaced page is invisible in the output | First pass through thumbnails |
| Orientation | A page on its side may return no words | Same pass |
| Blank, duplicate and separator pages | They use up page allowance and add noise to search | Same pass |
| Protection and packaging | The tool may refuse the file or see only a cover sheet | On opening |
| Comments and notes | They may vanish, stay, or be burned into the page | Before upload |
How much preparation is too much
Do the least that makes the conversion complete. Every edit to a working copy is a way to introduce a difference from the file you received, and for a document that may be produced, filed or challenged, differences need explaining. Schema Law's homepage says there is nothing to install and nothing to prepare before an upload. The items in this post are for the files a tool cannot open, and for the ones you would not want converted as they stand.
The first rule is the copy
Put the received file in a folder named as-received and never open it for editing. Make a copy with _work in the name. If your matter tracks hash values or the file came in a production, the received file is the one those values describe, and the working copy is yours to change.
Sideways and upside-down pages: rotate first or let the tool decide?
Rotate them yourself when there are few, and when you cannot confirm what your OCR tool does with a turned page. Let the tool decide only when its documentation says it detects orientation and a test on your own file bears that out. A page left on its side is a page that may come back empty.
Three kinds of turned page
- A quarter turn. A wide table, a spreadsheet printout or a plan fed through with the upright pages.
- A half turn. A sheet that went into the feeder head-down. The print looks normal at a glance in thumbnails and is upside down.
- A slight tilt. A page that slipped in the feeder by a few degrees. That is skew, not rotation, and it has a different remedy. The post on how to OCR a crooked scan covers it.
View rotation is not file rotation
A PDF reader's "rotate view" command turns the page on your screen for this session and changes nothing in the file. Close and reopen, and the page is sideways again. The OCR tool receives the file, not your view of it. To change the file, use the page rotation command in a PDF editor's page or organize panel and save.
A rotation applied that way is recorded as an instruction on the page and does not recompress the picture, so it costs nothing in image quality. Rotating by exporting the page to an image editor and re-importing it is different: it rebuilds the page and may lower its quality. Use the PDF editor.
A procedure for a mixed file
- Open the thumbnail panel and enlarge the thumbnails until you can tell which way the text runs.
- Scroll the whole file once and write down the turned pages: number and direction.
- Select the quarter-turned pages together and rotate them upright. Do the half-turned pages as a second group.
- Save the working copy.
- Reopen it and spot-check three of the pages you turned.
When to leave a page turned
If the file is going to be produced or filed in the same orientation it was received, think before you change it. One approach is to rotate pages in the working copy for recognition and reading, and keep the received file as the record. Another is to leave the pages alone and accept that the wide pages may not search. Which is right depends on what the file is for, and on any agreement or rule about how documents are to be produced in your matter.
Blank pages, duplicate pages and separator sheets in a scanned PDF
Remove a page from the working copy only when you are certain it carries nothing, and never from the file as received. Blank backs, repeated pages and separator sheets cost page allowance and clutter search results, but each can also be evidence, so the safe default is to note them and keep them.
Blank pages
A two-sided scan of single-sided paper produces a blank page after every real one. Before deleting any, look at each at full size. A back side that seems empty in a thumbnail can hold a received stamp, a handwritten initial or a faint fax line. The post on duplex scanning has a section on blank-page removal and the back side that holds only a stamp.
Ask what the page numbers in the file are used for. If anyone cites this PDF by page, or if a Bates number is printed on every sheet including the blanks, removing pages breaks the references. In that case keep them.
Duplicate pages
Duplicates come from a sheet fed twice, an attachment that repeats an earlier document, or two copies of a letter in the same folder. Two pages that look alike may differ in a way that matters: one copy carries a handwritten note, a different fax header or a later signature. Compare them side by side at full size before treating either as surplus.
For a working copy made only so you can search, removing a true duplicate is harmless. For a set where the fact of duplication matters, such as a production, leave them in.
Separator sheets
A scanning service or a careful colleague may have put a sheet between documents: a colored page, a barcode page, or a slip reading "Document break". Separators mark where one document ends and the next begins, which is useful information you should capture before removing them. Write down the page numbers on which each document starts, then decide whether to cut the file into one PDF per document at those points. The post on document unitization explains why those boundaries matter.
| Page type | Keep in the working copy when | Safe to remove from the working copy when |
|---|---|---|
| Blank back | Pages are cited by number, or carry any mark | Confirmed empty at full size and no one cites by page |
| Duplicate | The copies differ, or duplication is itself relevant | Confirmed identical and the copy is for search only |
| Separator sheet | You have not yet recorded the document breaks | Breaks are recorded and the file is being split |
| Fax cover sheet | It shows who sent what, and when | Keep it |
| Scanner test or patch page | Never needed | Always |
Keep a short removal log: which pages you took out of the working copy and why. It answers the question "why does your copy have 212 pages when ours has 240?"
Unlocking and unpacking: PDFs that must be opened up before OCR
An OCR tool can only read pages it is able to open. A PDF that asks for a password, a PDF that restricts changes, and a PDF that is a wrapper around other files each stop a conversion in a different way. The remedy is the right key or the right file from the person entitled to give it.
Protected files
There are two sorts of protection. One stops the file from opening without a password. The other lets it open and restricts copying, editing or printing. Either can cause a converter to reject the file or return nothing.
Do not try to get around a restriction. If the client set the password, ask the client for it, or for an unprotected copy. If the file came from opposing counsel, a court or an agency, the protection may reflect an order or an agreement, and the question is whether you are permitted to remove it at all. The post on OCR for a password-protected PDF explains why an OCR upload needs a client's PDF unlocked first and how to settle whose authority that is.
Check for protection before you plan the job. Open the document properties and read the security entry. A file that opens without a prompt can still be restricted.
Portfolios and attachments
Some PDFs are containers. A PDF portfolio holds a set of separate files, and an ordinary PDF can carry other files as attachments. The pages you see may be a cover sheet, and the documents you care about sit inside. An OCR tool given the container reads the cover and reports success.
Signs that you are holding a container:
- The file opens to a list or a grid of files, not to a page.
- The page count is one or two for a file of many megabytes.
- The reader shows a paperclip or attachments panel with entries in it.
Extract each component file to a folder using your PDF program's save or extract command, keep the container in as-received, and treat each extracted file as its own document from here on. Some components will be word-processor PDFs that need no recognition at all, and some will be spreadsheets or emails that are not PDFs. Sort them before you convert anything. The section on PDF portfolios and attached files that a search passes over covers how search treats these wrappers.
Size and page limits
A file that opens and reads perfectly can still be turned away for being too big. Compare it with your tool's limits before you upload. Schema Law takes a PDF, PNG or JPEG of up to 20 MB, and each plan sets a page ceiling for one document: 3 on Free, 250 on Solo and 1,000 on Team, with no fixed page limit per document on Enterprise, as the pricing page shows. If the file is over, cut it at a document boundary and not at an arbitrary page. The post on how to split a searchable PDF covers choosing cut points and confirming that no page was dropped.
Should comments and sticky notes be removed before OCR?
Decide deliberately, because tools differ: comments may be carried into the output, dropped, or flattened onto the page where they can cover the text beneath. If the comments are your own notes on a document going to an outside service or another party, take them out of the copy you convert and keep them in a separate annotated copy.
A comment in a PDF is an object attached to a page, separate from the page's picture. That separateness is why three outcomes are possible.
| What the tool does | Result | When it is a problem |
|---|---|---|
| Keeps comments as comments | Output has the same notes in the same places | When the output is going to someone who should not see them |
| Drops comments | Output is clean; your notes are only in the source | When you expected to keep working from the output |
| Flattens comments into the page | Notes become part of the picture and may be read as text | When a note box covers words, or note text pollutes search |
Find out which your tool does by testing one annotated page. The post on what conversion keeps has a section on comments, highlights and stamps on a PDF that goes through OCR.
Sort the annotations before deciding
- Your own notes. Margin comments, highlights and questions for a colleague. These are yours to remove from the conversion copy. Save an annotated copy first.
- Marks that are part of the document as received. A stamp, a signature or a handwritten note that someone applied as an annotation before sending the file to you. Leave these alone. Removing them changes what the document shows.
- Marks you cannot classify. If you do not know who added a comment, treat it as part of the document and ask.
Why your notes should not ride along
A sticky note reading "weak on causation, ask Dr. Feld" is your thinking about the case. In a file that is uploaded to a converter and then exported and sent on, that note can travel further than you intended. Removing your comments from the conversion copy keeps your thinking in your own annotated version and gives the OCR tool only the document.
Two copies, clearly named
Hale_Deposition_Ex14_work.pdf: no comments of yours, for conversion.Hale_Deposition_Ex14_annotated.pdf: your notes, for your own reading.
After conversion you will have a third, the searchable output. If you want your notes on the searchable version, add them there again or copy them across with your PDF editor's comment export and import, if it has one.
A pre-OCR checklist for a PDF someone else scanned
Run this checklist on any PDF you did not scan yourself, because you do not know what the scanning operator did or left out. It takes one pass through the thumbnails and one look at the document properties, and it catches the problems that are cheap to fix before conversion and expensive to find after it.
The file
- The received file is saved untouched in
as-received. - A working copy exists with
_workin its name. - The file opens without a password prompt, and the security entry in its properties shows no restriction that blocks your tool.
- The file opens to pages, not to a list of contained files.
- Size and page count are within your tool's limits, or cut points are chosen.
The pages
- The page count matches what the sender said was sent, or the difference is noted.
- Pages run in order. Printed page numbers or Bates numbers ascend without gaps.
- Every page is upright in the saved file, or turned pages are listed with a decision.
- Blank pages have been looked at full size, with a keep-or-remove decision recorded.
- Apparent duplicates have been compared, with a decision recorded.
- Separator sheets are logged with the page numbers on which documents start.
- Two-sided originals show both sides.
The extras
- Your own comments are saved in an annotated copy and removed from the working copy.
- Annotations that arrived with the file are left in place.
- Any page you doubt will read, such as a faint or handwritten one, is listed for checking after conversion.
The record
- A note in the matter file lists what you changed in the working copy: pages rotated, pages removed, files extracted.
What to send back instead of fixing
Some findings mean the scan should be redone, not repaired. If pages are missing, if every second page is absent from a two-sided original, or if the edges of the text are cut off, no housekeeping will supply what the scanner never captured. Ask the sender for a rescan and say exactly which pages. The post on missing pages in a scanned contract shows how to work out what is absent.
When the list is clean, convert the working copy. The how it works section of the homepage shows the upload, the page-by-page view of what was read, and the export. Then go back to the pages you listed as doubtful and read them against the scan.