15

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.

3 Answers 3

9

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

1
  • This bug is now fixed, so that, in recent Debian versions, pdftk warns about the missing password but it still performs the requested operation.
    – a3nm
    Sep 8, 2016 at 15:57
21

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.

1

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

1
  • Thanks for the information, but I'm still wondering which of the three options I presented are occurring.
    – Senseful
    Dec 2, 2010 at 0:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .