I've purchased a pdf and want to highlight areas of it and add comments for my own personal reference.

I've look at its properties through Foxit Reader (running through wine), and, irritatingly, I'm not allowed to Modify the Document or Comment in the Document

The pdf is just a normal pdf is every other respect.

How can I unlock this pdf so I can modify it and add comments?

  • So, this has been set so by the owner of the document. Ask the owner of the document for a non-protected version. If you don't have the rights to crack the document, and you do it nevertheless, make sure that you are not get caught… – Max Wyss Dec 13 '14 at 21:50
  • 1
    @MaxWyss Thankyou for your concern (really!) but I don't think highlighting the main themes of a novel is going to blow up into the crime of the century :P – Starkers Dec 13 '14 at 21:58

If you're not averse to using the terminal, there's a package called qpdf that you can install. It's in the software center. To remove protections from your file you can use something like this:

qpdf --password=your_password --decrypt yourfile.pdf output.pdf

That should do the job. As a side note, another useful (also command line) tool to have for working with pdf files is pdftk.
Example from man pdftk:

pdftk secured.pdf input_pw foopass output unsecured.pdf

Hope that helps!

| improve this answer | |

On Ubuntu 18.04 neither of two commands worked! (I don't know why). I followed the instructions to install pdftk (since it's no included in the repositories). However I figured it out (I think) in a simple way...

  1. evince mydocument.pdf
  2. ctrl+p
  3. Print to File (choose a new file name (or overwriting))

That's it, I could to highlight with Foxit Reader.

| improve this answer | |

Install Ghostscript and then run:

gs -sPDFPassword="$PASS" -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=%stdout% -c .setpdfwrite -f locked.pdf > unlocked.pdf
| improve this answer | |

Use this zsh function:

pdf-unencrypt () {
    : "Usage: <file>
Uses ghostscript to rewrite the file without encryption."
    local in="$1"
    gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile="${in:r}_unencrypted.pdf" -c .setpdfwrite -f "$in"

: is a no-operations function. $in:r gets the variable without its extension. You obviously need ghostscript installed.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.