Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a PDF File which says that document security is enabled. It says that the only things allowed are: Printing, Content Copying or Extraction, and Content Extraction for Accessibility.

I'm trying to use PDF Toolkit (PDFTK) to create a smaller version of this PDF file so that it takes up less hard drive space. When I try running PDFTK on the file, though, it says that the owner password is required. If I open up the file in a Adobe Reader, it doesn't ask for a password and opens up fine.

I'm not familiar with PDF encryption, and so I was wondering what's going on here and why I can read the file in Reader but not PDFTK.

It seems to me that there are three options:

  1. It's easy to read the data which is supposedly encrypted, but PDFTK respects the permissions flag and won't allow you to modify a file if you don't provide the owner's password.
  2. While it's possible to decrypt the data in a protected PDF (since it's not really secure), it's not a simple task and PDFTK didn't implement the logic needed to do this.
  3. The data is actually encrypted, and you need the owner password in order to read its contents.

Which of the three is correct?

It seems that #3 is unlikely since I am able to read the contents of the file in Acrobat without providing a password.

share|improve this question
add comment

3 Answers

up vote 2 down vote accepted

Your #1 is correct, and you can trivially fix pdftk: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=531529

share|improve this answer
add comment

The password in question is the permissions password. If you want to remove this you have to use a PDF password removal program (cracker) and these are freely available on the Internet (eg. freemypdf.com). If you would like more information on Acrobat and password security then please see http://www.locklizard.com/acrobat-security.htm

share|improve this answer
    
Thanks for the information, but I'm still wondering which of the three options I presented are occurring. –  Senseful Dec 2 '10 at 0:02
add comment

Agree with James: It's #1. Most *NIX tools (except for Adobe Reader) don't respect "owner" permissions at all.

Do this to remove "owner" passwords (if no "user" password is set):

Install qpdf. If on Ubuntu/Debian, you can use sudo apt-get install qpdf.

Once qpdf is installed use the following command:

qpdf --decrypt "filename.pdf" "output.pdf"

You can now do whatever you like with the file.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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