Have you ever been given a PDF document, only to find you can’t read it on your device of choice because it’s password-protected? Most universities nowadays make course material available in PDF format. However, some insist on making their material password-protected, in order to prevent unauthorized users from reading it.
Unfortunately, the password protection can cause other issues:
But if you have the correct password and can open the PDF file, there’s a (slightly tricky) way to store a non-password protected copy for personal use. There are a few different ways you can do this, but after trying out several methods, I believe this is the easiest.User CarlRJ over at MacOSXHints.com came up with this great, single-line command that does the job nicely (it’s further down on OSXhints in a comment below the original hint).
Make sure you have a postscript-capable printer installed and configured. Then:
sudo -s "cd /var/spool/cups; /usr/sbin/chown -v `id -u`:`id -g` d* | xargs -I@ mv -iv @ ~/Desktop/nopassword_@.pdf"
All done! You should now see a copy of your document on your desktop that can be opened without requiring a password.
Please note: This hint is provided for educational purposes only.