OCR a Password Protected PDF Without Losing Protection
By Schema LawPublished Updated
You can OCR a password protected PDF only from a copy that someone with the password and the authority has unlocked. That copy and every export made from it carry no protection at all. Track each one, put a password back on what you keep or send, and delete the rest.
This post treats the password as a confidentiality signal, which is what it is in a client file. It does not explain how to get past a password you were not given. If you lack the password or the authority, the answer is to ask the person who set it.
Why does an OCR upload need a client's PDF unlocked first?
An OCR service has to read the pages, and a password-protected PDF is encrypted so that nobody can read the pages without the password. The service receives scrambled content. So an unlocked copy has to exist before recognition can happen, and making it is a decision about the client's file as much as a technical step.
The published PDF specification, ISO 32000-1, puts the purpose in one sentence in section 7.6.1: "A PDF document can be encrypted (PDF 1.1) to protect its contents from unauthorized access." It adds that encryption applies to the strings and streams in the file, which is where the page content and any images live. An upload of that file hands the service a container with nothing it can open.
What you see when you try depends on the tool. It may reject the file with an error, or accept the upload and fail on the pages. Either way, plan on supplying a copy with the security removed.
That unlocked copy is the subject of everything below, because of three facts about it:
- It is a new document. The protected original still exists, unchanged. You now hold two versions with different levels of protection.
- It leaves your office. The copy that goes to the OCR service is the unprotected one.
- Its descendants are unprotected too. A Word or Excel export made from it has no password unless you add one.
Do not confuse two kinds of encryption. A service's statement that uploads are encrypted in transit and at rest describes how the service moves and stores files. It says nothing about the PDF's own password, which is gone from the copy you sent. The post on encrypted OCR explains what a service's encryption covers.
Which password on a client's PDF were you given authority to remove?
You have authority over the lock that the client, or someone acting for the client, handed you the means to open, for the purpose they gave it to you. A PDF can carry a password to open and a separate password that sets permissions. Being given the first does not mean you were given the second.
The specification describes "up to two passwords" for a document, "an owner password and a user password." PDF programs usually call them the permissions password and the document open password. The post on converting a protected PDF explains what kinds of protection a PDF can carry, and the post on copying text covers permission settings as a reason copying fails.
For a confidentiality decision, the more useful question is who set each lock and why.
| Who set the password | Typical reason | What being given the password tells you |
|---|---|---|
| Your client, before emailing you the file | To keep it safe on the way to you | The client wants you to read and use it. A working copy for the matter fits that purpose. |
| A third party that issued the document to your client, such as a bank or an employer | The issuer's standard delivery practice | The client could open it and passed that ability to you. The issuer's terms, if any, came with it. |
| The document's author, as a permissions password nobody gave you | To stop recipients copying or changing the content | You were meant to read it and nothing more. Ask before doing anything else. |
| Someone at your own firm, earlier in the matter | Firm policy for sensitive files | Find out which policy, because it probably governs the export too. |
Three checks before you make the unlocked copy:
- Look at how the password reached you. A password sent by the client in a separate message, for this file, is a clear grant. A password found in an old email thread about a different document is not.
- Read the engagement letter and any client guidelines. A client's guidelines may require that its documents stay encrypted wherever they are stored, or name the tools that may hold them. An unlocked upload to an outside service can breach that even when the client gave you the password.
- Ask when it is unclear. One line to the client settles it: "To make these statements searchable we need to create an unprotected working copy and run it through our conversion tool. Is that acceptable?" Keep the reply.
Write down the answer. A note in the matter file saying who authorized the working copy, and when, takes a minute and covers the question for good.
That note helps again if the same PDF later falls under a protective order or arrives with sealed records. Client confidentiality attaches to the unlocked working copy the moment you create it. Encryption on the original file does not follow the copy you upload. Track the unprotected file until you lock it or delete it.
Unlocking a PDF that opposing counsel or a court protected
A password set by opposing counsel or a court is not your client's to waive. If the password was sent to you so that you could open a production or a transcript, open it, and then follow whatever order or instruction governs the contents. If you were not given a password, ask for it or for an unrestricted copy.
Productions delivered under a password
A production may arrive as an encrypted file or archive, with the password sent separately. That is transport security. It protects the set while it travels and is meant to end when you open it.
What does not end is any protective order covering the documents. The unlocked production, the upload you send for OCR and the exports that come back are all copies of designated material, and the order's storage, vendor and destruction terms apply to each. The post on OCR for documents under a protective order goes through those clauses.
Files with restrictions you were not given the means to lift
Sometimes a produced PDF opens but refuses copying or export. Do not work around it. Write to the sender, say what the restriction blocks, and ask for a copy in the form the discovery requests or the parties' agreement call for. If the form of production was agreed and the file does not match, that is a point to raise with the lawyer handling discovery.
If the sender declines, the dispute belongs in front of the court, not in a software tool.
Files a court or court reporter protected
A transcript, a sealed exhibit or a pre-sentence document may arrive locked by the court or its reporter. The password that comes with it lets you read the file. Whether you may copy it, convert it or send it to an outside service depends on the order or rule behind the restriction. The post on OCR for sealed records covers what to settle first.
A file that was not meant for you
If a locked file and its password reach you by mistake, do not open it to find out what it is. Take it to the responsible lawyer. What your jurisdiction's rules require on receiving misdirected material comes before any question of conversion.
What happens to the protection once the PDF is unlocked for OCR?
Once the PDF is unlocked, the protection exists only on the original. The working copy, the upload and every export are ordinary files that anyone can open. Nothing in the conversion puts the password back. From that moment the client's information is guarded by where those files are stored and who can reach them.
Count the copies. A single conversion can leave five or more:
| Copy | Where it sits | Protected by a password? | What to do with it |
|---|---|---|---|
| The protected original | Matter folder | Yes | Keep, unchanged |
| The unlocked working copy | Wherever you saved it | No | Keep in a restricted folder, or delete after conversion |
| The upload | The OCR service | No | Delete when exports are checked |
| Each export (Word, Excel, searchable PDF, text) | Browser download folder | No | Move to the matter folder, then re-protect or delete |
| Attachments, if you emailed any of these | Mail servers and inboxes | No | Avoid creating them |
The upload is the copy outside your walls, so it deserves the shortest life. Schema Law's homepage says "Delete any document whenever you choose. The original file and everything parsed from it are removed". Nothing is deleted automatically on any plan, and an unlocked client file should not sit in an account for months, so delete it by hand once the exports are checked. The post on OCR with data retention control covers how long an uploaded copy is kept and who decides.
A worked example
A fictional file: Ilse Brandvold, a client in a partnership dispute, forwards twelve monthly brokerage statements. Each is a scanned PDF that needs a password to open, and her broker's cover email explains how the password is formed. She sends you that explanation in a separate message.
The paralegal confirms with Ms. Brandvold that a working copy is acceptable, opens each statement, and saves twelve unlocked copies into a restricted subfolder. She uploads them, exports Excel to total the transfers and a searchable PDF for the file, and checks the figures against the page images. Then she deletes the twelve uploads from the service, clears the download folder, and deletes the unlocked working copies, since the searchable PDFs now serve the same purpose. The searchable PDFs get a new password. The Excel workbook gets one too. The log shows 12 originals kept, 12 working copies deleted, 12 uploads deleted, 13 exports kept and protected.
Without the count, the usual outcome is different: the originals sit safely encrypted in the matter folder while twelve open copies wait in a download folder on a laptop.
Putting a password back on the converted export
Put protection back on an export with the program that opens it, or by storing it somewhere that is itself protected. PDF, Word and Excel files can each carry their own password. Plain text, CSV, JSON, Markdown and HTML cannot, so they need an encrypted container or an access-controlled location instead.
| Export format | Can the file itself hold a password? | How to protect it |
|---|---|---|
| Searchable PDF | Yes | Set a password to open in your PDF program's security settings |
| Word | Yes | Use the program's encrypt-with-password option when saving |
| Excel | Yes | Same option, applied to the whole workbook |
| CSV, plain text, JSON, Markdown, HTML | No | Keep in a restricted folder, or place in an encrypted archive before sending |
A few points decide whether the new protection is worth anything.
Match the original, or do better. If the client's file needed a password to open, the searchable PDF you keep should too. A weaker lock on a more useful copy is a step down.
A workbook password and a sheet password are different. Protecting a sheet stops accidental edits to cells. It does not stop anyone opening the workbook and reading it. For confidentiality you want the option that encrypts the file.
Restrictions do not travel to other formats. If the original PDF barred copying, a Word export of the same content has no such bar. It is editable text. The only way to honour the original restriction is to keep the export internal.
Use a long passphrase and store it. A forgotten password on an encrypted file generally means the content is lost. Record it in the firm's password manager under the matter name. Do not put it in the file name or in a note saved beside the file.
Check what the recipient can accept. A password stops a filing system or a review platform from reading a file, just as it stops an OCR service. Protect the copy in your own records and prepare the outgoing copy separately. For court filings, the post on searchable PDFs for court filing has a pre-filing check.
Test it. Close the file, reopen it, and confirm the prompt appears. Then confirm the right password opens it. Do this before you delete the unprotected version.
Treat every export from any converter as unprotected until you have done this yourself. Schema Law's listed export formats describe what each file contains, and none of the descriptions mentions a password.
Sharing a PDF password without defeating it
Share a password through a different channel from the file, with only the people who need it, and never in a place that travels with the document. A password in the same email as the attachment protects nothing, because anyone who gets one gets both.
Rules that hold up in a busy office:
- Split the channels. Send the file by email and give the password by phone, or the other way round through a channel the recipient already uses with you. A second email to the same address is better than nothing and worse than a call.
- Confirm the recipient first. Call a number you already have on file. Do not use a number from the email that asked for the document.
- Use a different password for each matter and each recipient. A firm-wide standard password becomes known to every former employee and every past recipient.
- Avoid guessable formulas. A password built from the client's surname and the year can be worked out by anyone who knows the client.
- Keep it out of the file name, the email subject and the cover letter. Also keep it out of the document management system's notes field for that file.
- Record that it was shared, not what it is. The matter log should say who received the password, when and by which channel. The password itself belongs in the password manager.
- Change it when the audience changes. If someone who had the password leaves the matter, re-protect the copies still in use with a new one.
When a client sends you a password in the same message as the file, the protection has already been weakened, and it costs nothing to say so. A short reply suggesting a phone call for the password next time helps the client with every other firm and adviser they deal with.
One limit applies to all of this. A password controls who can open a file. It does not control what an authorized person does afterward, and you have just demonstrated that by making an unlocked copy for OCR. The people you give a password to can do the same. Share the protected file only with those you would trust with the open one.
For the service side of the picture, Schema Law's security commitments are listed on its homepage. They describe how the service handles what you upload. The password on the PDF, and the discipline around the copies, stay with you.