There was an error in this gadget

Saturday, July 30, 2011

Removing a password from a PDF on Linux

if you know the password for a PDF and want to remove it, you can use the command line tools pdftops and ps2pdf to free your PDF from its chains.

Install pdftops. On Ubuntu, you can do:
apt-get install xpdf-utils
Install ps2pdf. I think this is already included with a default Ubuntu.
Convert the PDF to a postscript file, using the password:
pdftops -upw .pdf
Convert the resulting postscript (which is now sans password) back to a PDF:
ps2pdf .ps

No comments:

Post a Comment

Twitter Bird Gadget