4

I have several PDF files each with the same password that I know.

What tool or method could batch unlock them and provide a copy of each of the PDFs as an unlocked version?

There's CutePDF - could I use this to print all the PDFs to PDF and it will batch unlock them?

Also: - Virtual Image Printer driver - sourceforge.net/projects/pdfcreator/‎ - pdfforge.org

Can these unlock in batch?

4 Answers4

1

Over the years Adobe change their DRM and security methods so as to try to strengthen weak PDF security. Thus older applications like PDFtk and A-PDF fall behind.

pdftk "aes256_unicode_passwordΨ fi1.pdf" output output.pdf user_pw "Ψ fi1"

Error: Failed to open PDF file: aes256_unicode_passwordΨ fi1.pdf Errors encountered. No output created. Done. Input errors, so no output created.

Even with correct codepage for Unicode it cannot handle the mix

Error: Unable to find file.
Error: Failed to open PDF file:
   aes256_unicode_passwordΨ fi1.pdf
Errors encountered.  No output created.
Done.  Input errors, so no output created.

and when name is simplified still cannot handle newer encryption

Error: Unexpected Exception in open_reader()
pdftk.com.lowagie.text.exceptions.InvalidPdfException: unknown.encryption.type.r

enter image description here

The current most reliable personal USER method is using a constantly updated cross platform open source
PDF command line fixing / editing tool. (Binaries at github) "qpdf"

A content-preserving PDF document transformer

https://qpdf.sourceforge.io/ enter image description here

It is the one that will make the fewest changes to contents, thus reducing collateral damage in this case to simply breaking signatures which "by design" will be broken by ANY pdf manipulator.

To rewrite the PDF file the "opener" -password is clearly needed and to remove the internal DRM encryption (required to protect the "password") the command is -decrypt.

Thus the task is simplified to run a batch of filenames with the recommended command. There are hundreds of different "options" but this should be the minimum that is needed in this case:

qpdf in.pdf --password=password --decrypt out.pdf

Beware that any command line use of spaces and Unicode / Ligatures can be a challenge. My test file has a small password but needs careful handling.

qpdf "aes256_unicode_passwordΨ fi1.pdf" --password="Ψ fi1" --decrypt out.pdf

enter image description here

Latest release 11.10.0: February 8, 2025 includes for those that want them.

Notable enhancements include allowing qpdf to be built with the zopfli library (slow but good compression) and the addition of --remove-metadata and --remove-info options.

Latest Manual https://qpdf.readthedocs.io/_/downloads/en/stable/pdf/

K J
  • 1,248
1

Use pdftk

pdftk input.pdf output output.pdf user_pw PASSWORD

and a simple for-loop in your shell.

vbraun
  • 369
0

You can try cipherbox, a free software to unlock your password-protected PDF files in batch. According to the description of its webpage, cipherbox works on all PDF versions including AES encryption. It applies to word and zip files too.

Kevin Panko
  • 7,466
-1

The following program did the job:

http://www.a-pdf.com/faq/how-to-decrypt-pdf-security.htm

The download trial for it worked. Purchasing the full version at $27 which I think is reasonable for a convenient tool that works.

Update

There is also ilovepdf.com which is a freemium service in that it has some free options that may cover those doing a similar task as me, depending on the quantity and other conditions of using the free version. Pricing information if requirements are not offered by the free service are here: https://www.ilovepdf.com/pricing

No affiliation. The above came from a suggested edit from user Rythorian Ethrovon Their affiliation not known. I included the reference to ilovepdf as an update to this existing answer, to add to the original, rather than a complete replacement to my existing answer.

My response on their edit suggestion is: 1. don't suggest an edit that entirely replaces the original answer that still had the same useful value. 2. Instead of posting your solution as a edit suggestion, post your solution as an additional answer - you can do that! Or as a comment.

All that said, my preference is for my original answer in a-pdf because it is an application, which, as far as i can tell, handles all my pdf file data locally, rather than as a cloud service where I may have less control or understanding of how long my pdf files would be stored in the cloud and if they would be used for purposes outside of my task. But cloud services can suit many, including me, jsut depends on the specific circumstance.