Here's a quick and dirty way to remove PDF protections and allow printing of a PDF that has been restricted.
First we need to convert the PDF to Postscript using Ghostscript. Next, we convert the Postscript back to PDF.
Note: The conversion isn't 100% accurate, but should be sufficient for most purposes.
Example:
pdftops Example.pdf Example.ps
ps2pdf Example.ps Example_unprotected.pdf
This only works for an encrypted PDF that allow viewing without a password but not printing or copying.
pdftops and ps2pdf can be installed onto most Linux distributions using your systems package manager.
— Andrew
Very useful. Thankyou! giann.net