User Tools

Site Tools


Remove the restrictions from PDF files

16.07.2010 last update 27.09.2013

OK, so we suppose that you have a pdf file with a *forgotten* password on it. You can view the file, but you cannot edit or print it.

  • To print it (shortcut)

Use Evince or Okular to open the pdf. Evince seems not to care about the limitations, and Okular can be instructed to do so (Settings/Configure Okular/General/Obey DRM limitations)

  • To edit it: Transform it to a ps file

$ pdftops  Protected_password.pdf

  • Save it again as a pdf file

$ ps2pdf Passwordless.pdf

  • Edit the newly obtained pdf

Using your weapon of choice (for example PDF Editor), you can now modify the file (a copy of the original without the restictions).

  • If you forgot the owner password also, here is the rescue

gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=unencrypted.pdf -c .setpdfwrite -f encrypted.pdf

Taken from here.

The solution seems not be working anymore, gs is asking for the password now. If you have it, but want to obtain a copy of your pdf without any password, run:

qpdf --password=YOUR-PASSWORD --decrypt input.pdf output.pdf

linux/remove_pdf_restrictions.txt · Last modified: 2013/09/27 16:47 by admin