How to batch unlock multiple PDFs which have same known password?

3

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?

therobyouknow

Posted 2013-08-20T14:37:53.253

Reputation: 3 596

I don't have the reputation to post. In the terminal go to the directory with your files then call brew install qpdf then for file in *.pdf; do $(qpdf -password=password123 -decrypt --replace-input $file); done – Declan McKenna – 2020-01-23T15:33:25.283

possible duplicate of FOSS Script for unlocking PDF for printing

– Ƭᴇcʜιᴇ007 – 2013-08-20T14:56:28.780

I don't think that it is a duplicate @techie007 as that question deals with DRM, my question isn't about DRMed PDFs, simply PDFs that are password protected. Thanks. – therobyouknow – 2013-08-20T15:05:45.727

Password protecting a PDF is a form of DRM. ;) – Ƭᴇcʜιᴇ007 – 2013-08-20T15:47:46.687

Thanks techie007 - yes I agree there are many approaches to DRM which can include use of a password. But to me DRM is primarily about restricting how many copies of a file can be viewed, listened to or watched. I think my case is not primarily about DRM as here, a password is used on the PDF so that it is not seen by those who shouldn't but if it was made public there would be no such restriction. Also, I feel my answer adds value in the context of unlocking and in batch - the other answer may not occurred to others like me who are looking to just unlock a batch of files, not print them. – therobyouknow – 2013-08-20T16:00:03.250

I can see your points, and they are valid (or at least reasonable ;) ). Hence why it takes 5 votes to close -- we'll let others read what we've written here and they can decide. :) – Ƭᴇcʜιᴇ007 – 2013-08-20T16:03:24.370

Thanks techie007 :) Put it another way, if you wrote a book and sold it to me as a download password protected PDF and told me the password, then I could give copies to my friends and tell them the password so they wouldn't have to pay you money (which I wouldn't do because I'm a nice guy - I would make them buy their own from you). So This is not I would call DRM because it doesn't do what DRM is supposed to do. That's why amazon don't use it. Though I kno some publishers do do it but they also put the buyer's address on each page as a deterrent and to instill paranoia. – therobyouknow – 2013-08-20T16:12:09.900

1

On Linux you can use qpdf for the task. See here for a batch decryption script which can be easily integrated into the context menu of file managers like Nautilus.

– Glutanimate – 2013-09-08T18:02:29.250

+1 Thanks Glutanimate for the qpdf example, I did see qpdf in search results but the apparent fiddling with package managers etc put me off. Don't get me wrong, I use Linux all the time and deal with this stuff, I just didn't feel like the effort was worth it (maybe another time when I had more motivation perhaps). So the http://www.a-pdf.com/faq/how-to-decrypt-pdf-security.htm suited me just fine: download, install, run, clikc here and there and done! Life's too short... Oh, and I preferred a Windows solution as my tags in the question indicate. thanks anyway, upvoted ya!

– therobyouknow – 2013-09-08T18:42:00.603

Answers

0

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.

therobyouknow

Posted 2013-08-20T14:37:53.253

Reputation: 3 596

1

Use pdftk

pdftk input.pdf output output.pdf user_pw PASSWORD

and a simple for-loop in your shell.

vbraun

Posted 2013-08-20T14:37:53.253

Reputation: 341

+1 thanks I'll check it out when I get home and have time/access to the documents. – therobyouknow – 2013-08-20T15:04:50.753

1For me this didn't work, got error OWNER PASSWORD REQUIRED, but not given (or incorrect) when I tried BOTH user_pw and/or owner_pw as command line options as described in the documentation. Conclusion: pdftk didn't know how to decrypt my particular PDFs - but might work for someone else's. – therobyouknow – 2013-09-08T15:49:44.780

1

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.

John Shawnes

Posted 2013-08-20T14:37:53.253

Reputation: 11