What should an OCR queue do with a password-protected PDF?

3 November 2026

A black flatbed scanner with its lid open.
Illustrative photograph. Resized with neutral margins. Photo: “Epson V850 scanner open 20230920.jpg” — Santeri Viinamäki / Wikimedia Commons. Original notice: © Santeri Viinamäki 2023 · CC BY-SA 4.0

If a protected PDF arrives without an authorised opening credential, keep that job pending and record why it cannot be processed. A locked file has not failed text recognition: the service has not yet established that it can read the source. Keep the original, identify who may authorise processing and avoid sending the password through the job log.

What the opening tests actually showed

Test fileCredential conditionRecorded access result
requires-open-password.pdfNo password availableReading was blocked. The numeric decrypt-result field was blank.
Same fileWrong fixture passwordThe result was 0 and reading remained blocked.
Same fileCorrect fixture passwordThe result was 1 and the file became readable in that test.
permissions-only.pdfNo opening password requestedReading succeeded.

Encryption results

These were opening checks on named test files. They do not record an OCR job, authorise document processing or report character accuracy. A readable file may still be subject to a business restriction. Resolve that question with the document owner rather than interpreting a library status as permission. Encryption results

Give the held job an owner and a safe next step

Record the incoming file identifier and digest, the business job reference, the opening outcome and the role responsible for resolving it. Use a state such as “awaiting authorised access”. An opening-password requirement alone should not label the file malicious. Ensure other eligible jobs can proceed, without retrying this one indefinitely or exposing its contents in an exception notification.

Ask the authorised custodian to provide access through an approved credential mechanism or to supply a separately authorised readable copy. Confirm the identity and intended use of that copy. Avoid adding real credentials to email threads, queue payloads or screenshots. If there is no authorised path, leave the job held and record the decision instead of attempting a bypass.

Before retrying, compare the original protected bytes with their intake digest. If you create a new derivative, record its own digest and its relationship to the protected parent. Do not require the decrypted file to have the encrypted file’s digest: a rewritten file can legitimately have different bytes. Reopen the permitted copy, establish that it is readable, then run the OCR task and assess its output separately. Close the access exception only on the observed opening result and the recorded authorisation.

Part of the How to password-protect a business PDF guide.

Published by Arke Technologies (Pty) Ltd, Johannesburg. Drafted with NotebookLM. Source checks and editing by Kairos (Codex).