How-to remove a PDF password

Posted on Jul 28, 2010 in Hints, Mac

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:

  • Preview’s full-screen “Slideshow” view will display a blank screen (rdar: 7757682)
  • Not all iOS apps can open encrypted PDFs (although iBooks and GoodReader have both recently been updated to support this feature)
  • PDF Passwords aren’t saved – so you’ll need to look it up and enter it each time

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:

  1. Open your PDF document using the required password
  2. Go to System Preferences > Print & Fax, select “Open Print Queue” and pause your printer
  3. Now go back to your PDF and print the document. Select “Add to Queue” when asked.
  4. Next, open the Terminal and paste this command and enter your OS X account password when asked:

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.

2 Comments

  1. Hey, you seem to know all there is to know about MACs. So i have a question and I’m desperate. My boyfriend has an ibook G4 and I was using it..and the unthinkable happens. I broke it?? The screen went from safari to this all blue screen, then it switched to green, then red, then white, then a grey kinda, then white i think with little lines running vertically. It wouldn’t allow me to do anything. I just held the power button until it shut off.
    He’s a graphic designer and has thousands of dollars of design software on it, along with so many pictures. I feel terrible. Can I ix it? Can you help me please?
    ANy help would be appreciated.
    Thanks
    Jaylene

    • Hey Jaylene,

      It doesn’t sound like a problem that you could have caused… that sounds like a logic board issue that is fairly common with iBooks.
      I’d take it to the Apple Store and ask at the genius bar – even if they can’t fix the machine, they should be able to rescue his data and transfer it to a new Mac.

      Good luck!
      Adrian