Removing known PDF Passwords

Hey folks! Is it possible to remove the password (knowing it) from a PDF from Scriptable/Shortcuts? There are bills which I receive monthly by email that I’d like to send to Evernote without its password, but in some automated way…

I do this from the command line, but it certainly can be scripted.
I use QPDF installed from Homebrew.

You can pass variables to the shell script:

$ qpdf --password='_your password_' --decrypt inputfile.pdf outputfile.pdf

Update: I do this on my mac…not sure how it could be done on iOS.

Thanks Isaac! I’ll give it a try!
Maybe it can also be done via Scriptable then?

No. QPDF isn’t available on iOS. I use it on Windows and Mac and it is really useful and would be perfect if you were doing it on a desktop OS. Scriptable is a Javascript environment and is really not geared to processing PDF files in any way.

You might be able to do something with Pythonista on iOS if you could get the right library in, but that’s a maybe.

In you position I’d probably be looking for some sort of web service I could upload the file to to have it remove the password.

If you happen to have an always on Mac, then a combination of your favourite iOS accessible cloud storage service, Hazel and QPDF could also save the day.

1 Like

That’s what I do. Hazel and PDFTK (open source).