Remove the password from a PDF


pdftk my.pdf output my-decrypted.pdf input_pw PASSWORD

On MacOSX

The download of pdftk for MacOSX is borked. The link on their homepage points to an old version, and the new version didn’t work either.

You need a couple of packages installed:

brew install poppler
brew install ghostscript

Then convert to PostScript and back to PDF:

pdftops -upw PASSWORD my.pdf
ps2pdf my.ps my-decrypted.pdf

Side note

PDFs can have two passwords:

  • an OWNER password, which only controls features and can be removed without actually knowing the password
  • a USER password, which actually encrypts the file

source

Tags:  pdf

Share: