I need to resize a pdf file to crop its surrounding white border. I can crop it using PDF-Shuffler on Ubuntu. But cant save the change, because of owner password protection. When i try to open that file using PDF-Editor, it asked for that password.

Since I dont know that owner password, so cant use regular recovery system. There are lots of online system too, but thats very slow process even most of those cant remove owner password. Now looking for a script/software specially for Ubuntu to remove that owner password.


Ubuntu repositories have a tool called pdfcrack that can be installed using the package manager. This can attempt to brute-force (guess) the password for you.

Important note: in many countries the penalties for circumventing encryption are very severe. Be sure you have the legal right to crack the password before continuing.

Open a terminal and do something like this:

sudo apt-get install pdfcrack
pdfcrack -f MYFILE.PDF
  • In the USA you could be performing illegal activities if PDF cracking falls under the DMCA. While I don't think they're going to knock down your doors, it's important to know. Since I'm in Canada, I appreciate now knowing about pdfcrack, for those one-off's. – BloodyIron May 1 '12 at 16:43
  • @dwurf, thanks a lot. I will try it and remember your warning. – Sadat May 1 '12 at 17:23
  • @dwurf,pdfcrack cant detect OWNER PASSWORD PROTECTION. – Sadat May 1 '12 at 17:25
  • @Sadat from the website: - Supports cracking both owner and userpasswords – dwurf May 1 '12 at 21:24

On Ubuntu you can use the following commands to decrypt PDFs with forgotten Owner Passwords trivially:

  1. Install package qpdf:

    sudo apt-get install qpdf
  2. Decrypt PDF:

    qpdf --decrypt encrypted_document.pdf decrypted_document.pdf


  1. The above instructions assume that you are trying to decrypt a PDF with a forgotten Owner Password (i.e. you can open the PDF and view its content but are restricted from making changes, prints, etc. without the password). These types of encrypted PDFs are trivial to decrypt and don't require tools like pdfcrack or hashcat (dictionary/brute force password crackers)

  2. On the other hand a PDF with a forgotten User Password (i.e. you cannot view the content of the PDF without supplying the password) will require PDF dictionary/brute force password crackers and you are not always guaranteed to find the password. If however you do have the User Password and simply want to save a decrypted version of the PDF you can do this to with qpdf as follows:

    qpdf --password=ENTER_PASSWORD --decrypt encrypted_document.pdf decrypted_document.pdf
  3. Windows binaries of qpdf can also be downloaded from http://qpdf.sourceforge.net/

protected by slhck May 3 '12 at 8:53

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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