Removing PDF password protection

I recently bought a pdf book. It was password-protected (40bit security). Unfortunately some of the PDF viewers on Linux cannot open password-protected pdf files. So I decided that I can remove the password protection for private use.

A quick lock at the web showed two very easy methods of password removal:

  • Opening with gsview and printing to a ps file and redistilling
  • Doing the same on MacOSX but using Apple's pdfviewer

Now this might have worked some time ago, but the newer version of gsview I am using didn't even manage to open mdf file (although that might have been unrelated to the password protection). And the newer version of Apple's PDF viewer definitely honoured the flag that disallows redistilling. I didn't want to downgrade my programs, so I used a demo version of a commercial PDF password manager: Prof PDF Protection Manager. This program opened the protected pdf file and removed the protection without problems. The demo version prints a duplicate logo on each page consisting of six graphical elements. However, if you own Acrobat, you can simply delete the logo. This is maybe feasable for a couple of pages, but not for several hundred, but actually a script should be able to do so automatically as the logo's size, shape and position seems to be identical on all pages.