I recently came across a pdf file that required a password to open. This isn’t a super uncommon thing, particularly when sensitive files are being sent over email. The problem with this though is if I want to save the file (to say iCloud Drive), and open it later, I’m never going to remember the password when I need to open the file.
There’s usually a pretty simple way to “remove“ the password from pdf files. Unfortunately, for some reason that way did not work on this file.
I went looking around for another way to do this, and came across qpdf. And… it worked!
I figured I’d share this in case it’s useful to anyone else, and so I can find it easily when I need it the next time.
qpdf --decrypt --password=<password> a.pdf a-nopasswd.pdf