Skip to main content

Password-Protected PDFs

Whether DocAI Fabric can process a protected PDF comes down to one question: does the file open without a password? Restrictions on what a reader may do with an open file, such as no printing or no copying, do not stop processing. A password needed to open the file does.

A quick test: open the file in a PDF reader. If it asks for a password, it cannot be imported as it is. If it opens straight away, it can almost always be processed, even when the reader marks it as secured or greys out Print and Copy.

What can be processed​

ProtectionWhat happensWhat to do
Restrictions only: no printing, copying or editing, set with a permissions password. The file opens without a passwordProcessed in full, like an unprotected fileNothing
Password on attachments only: the document opens freely, its attachments need a passwordPages are processed and read by the OCR engine. The attachments are not read. A file of one page fails, as in the row on cover pages belowNothing, unless the file has one page
Password to openImport fails with password protectedSend a copy without the password
Certificate encryption or rights management: the file opens only for named people or with a special plug-inImport fails with protected in a way that cannot be openedAsk the sender for an unprotected copy
Protected content behind a cover page: an open PDF showing a notice, with the real document attached in encrypted form, or any one-page PDF with a password-protected attachmentImport fails with protected in a way that cannot be opened, even though the page itself opens: it is the attachment that cannot beAsk the sender for an unprotected copy
PDF portfolio: a one-page cover with documents attachedImport fails with a PDF portfolio, whose attached files are not readSend the documents inside separately
AES-GCM encryption, the newest PDF encryptionImport fails with protected in a way that cannot be openedAsk the sender for a copy without it

The age and strength of the encryption make no difference to the first and third rows: from 40-bit RC4 to AES-256, the same rule applies.

Restrictions are not enforced​

The platform reads every page whatever restrictions the file sets, including no copying and no text extraction. Those restrictions are addressed to people using a PDF reader, so it is up to you to check that you may process the file.

Restrictions do not carry through to the results. Exported PDFs and page images are built from the processed pages and have no restrictions of their own. The source file stays as you uploaded it.

When a file needs a password​

There is no place to enter a PDF password, in the app or through the API, so a file that needs one cannot be processed until the password is removed.

The file is found at the Import step, whichever way it arrived: an upload, the API, an email or a hotfolder all accept it first. Import then fails, and so does the transaction, with a message naming the file. The pages of the other files in the transaction are kept. You can resume from the step after Import to go on without that file, or cancel and send a readable copy in a new transaction: a Failed transaction takes no new files. See Files that cannot be imported.

Making a copy without a password​

Do this only if you have the password and are allowed to remove it. Open the file in a PDF reader with the password, then do one of these:

  • In the print dialog, choose Save as PDF or Microsoft Print to PDF as the printer.
  • In Adobe Acrobat, open the file's security properties and set the security method to No Security.

A rights-managed or certificate-encrypted file usually cannot be unlocked this way. Ask the sender for an unprotected copy.

ZIP archives​

Inside a ZIP, there are two different kinds of password:

  • A password-protected PDF in an ordinary ZIP: the archive is accepted, and the PDF fails at Import as described above.
  • A ZIP that is itself encrypted: the upload is refused and nothing is stored.

PDF portfolios​

A PDF portfolio is a cover page with the real documents attached to it. Import reads a PDF's pages, not its attachments, so a portfolio with a one-page cover fails at Import instead of going on with that page alone. Extract the files from the portfolio in your PDF reader and send them in a new transaction.

A portfolio with two or more pages of its own is read like any other PDF: those pages are imported, and the attached documents are not. If documents are missing from a transaction, check whether the file was a portfolio and send them separately.

An ordinary attachment does not stop a PDF. An e-invoice with an XML file embedded in it, for example, is imported as usual: its pages are read, and the attachment is not.

If a page shows only a notice​

Import recognises protected files and portfolios by the marks the PDF standard defines for them. A file made another way can still get through with a page that only says the document is protected, or with white pages. If a file comes from a secured source and extraction returns little or nothing, open the transaction and look at its pages. A notice or a white page means the real content was not read: send an unprotected copy.