How do I decrypt a password-protected PDF on OSX?

I have a PDF that requires a password to view. I know what the password is. I frequently open this PDF to print it, and find entering the password each time incredibly annoying. How can I remove the password from the PDF?

Since I need to print it, simply taking a screenshot isn't a good solution.

I tried printing the file to a PDF, but Preview disables the "Save as PDF..." option in the print dialog.

disabled option


There's a command-line tool called qpdf that can remove the password encryption from your PDF files, even in cases where Preview won't let you save a copy of or export the PDF.

Installing with Homebrew

  1. Install Homebrew if you haven't already.
  2. Install qpdf on your system by typing the following in Terminal:

    brew install qpdf
    

Installing with MacPorts

  1. Install MacPorts if you haven't already.
  2. Install qpdf on your system by typing the following in Terminal:

    sudo port install qpdf
    

Usage

Once qpdf is installed, use it to decrypt the file by typing the following in Terminal:

qpdf --decrypt --password=xxxxx encrypted-filename.pdf decrypted-filename.pdf

You can then open decrypted-filename.pdf in Preview to verify that it worked!


Nathaniel's answer inspired me decide to try File/Save As... in Preview, which let me save a copy of the PDF with no password.

Save As dialog

I'm surprised that it was that straightforward, but it worked.