Close
    Search Search

    How to unprotect a PDF with password

    Unprotect a PDF with password on opening

    How to unprotect a PDF with password

    As just said, unprotect a PDF with password it is a feasible operation but with varying difficulty: if the document to be unlocked is protected by a user password, then from a password that blocks the display, you have to attack it with a technique called Brute Force, through which all possible combinations of characters are tried until the one that makes up the right keyword is found. This procedure, as can be easily understood, can take a long time to complete (especially if the PDF password is composed of many characters and among these there are special characters) and requires a certain computing power.



    Among the solutions that have allowed me to obtain the best results is PDFCrack: a free and open source program that supports unlocking PDF files on Windows, macOS and Linux. Unfortunately it only works from command line, so it doesn't have a graphical interface, but it's not very difficult to use. Now I'll explain how it works on both Windows and macOS.

    Windows

    How to unprotect a PDF with password

    If you have one PC Windows, you can download PDFCrack by connecting to the program's website and clicking on the item Download(pdfcrack-xx.zip, xxk) located in the right sidebar.

    When the download is complete, open thezip archive that contains the program, extract the contents to a folder of your choice and open the Command Prompt Windows. At this point you just have to give the following commands to use PDFCrack and start searching for the password of the PDF you want to unlock.


    • CD "[PDFCrack folder]", where instead of [PDFCrack folder] you have to enter the full path of the folder where you extracted PDFCrack. If you don't want to waste time, you can simply drag the folder into the prompt, after the command CD [space].
    • pdfcrack "file.pdf", where instead of file.pdf you must enter the complete path and name of the file to be decrypted.

    Once the command is given, PDFCrack will begin to "attack" the document to search for the password: once found, it will return the message found user-password followed by the password needed to open the file.


    MacOS

    How to unprotect a PDF with password

    If you use a Mac, you can download PDFCrack by connecting to this page of the SourceForge site and clicking on the green button Download latest version. When the download is complete, open thetar.gz archive you just downloaded and extract the contents to a folder of your choice.

    Now, open the terminal macOS (which you can find in the Other of the Launchpad) and give the following commands, in order to compile the program and make it usable.

    • cd [PDFCrack folder], where instead of [PDFCrack folder] you must enter the full path of the folder where you extracted PDFCrack. If you don't want to waste time, you can simply drag the folder into the Terminal after the cd [space] command.
    • make -f Makefile.

    When compiling is complete (this should take a few seconds), open a new window of the terminal and give the following command to know the password of your PDF.

    • [PDFCrack folder] / pdfcrack -u "file.pdf", where instead of [PDFCrack folder] you must enter the full path of the folder where you extracted PDFCrack and instead of file.pdf you must enter the full path and name of the files to decrypt.

    Unprotect a PDF with password against printing and modification

    Do you need to unprotect a PDF that's locked against printing or editing only? In that case you are dealing with one owner password which, as mentioned at the beginning of the post, is very easy to remove. You can even turn to online services to succeed in your intent: try it!



    iLovePDF (Online)

    How to unprotect a PDF with password

    iLovePDF is a service that offers numerous functions for editing PDFs online and protects the user's privacy. In its free version it allows you to unlock only one PDF at a time, as long as it does not exceed 80MB in weight. To remove these limits, you need to subscribe to a paid service plan, starting at 3,99 euros / month.

    To unlock a PDF with iLovePDF, linked to this page of the service, drag the document of your interest to the button Select PDF file and presses the button Unlock PDF. The unlocked document will be automatically downloaded to your computer.

    QPDF (Windows / macOS / Linux)

    How to unprotect a PDF with password

    If you do not want to be subject to the limitations imposed by online services, you can unlock your PDFs with QPDF: a free and open source software compatible with all major computer operating systems: Windows, macOS and Linux. Like PDFCrack, QPDF doesn't have a graphical interface either, it just works from command line, therefore it could be a bit difficult to use the first few times.


    That said, let's take action! The first step you need to take is to download QPDF: if you use a PC WindowsHaving said that, if you use a Windows PC, connect to the SourceForge page dedicated to the program and click on the item qpdf-xx-bin-mingw64.zip a 64 bit operating system was used oppure sulla voce qpdf-xx-bin-mingw32.zip if you are using a 32-bit operating system. When the download is complete, open thezip archive which contains QPDF and extract the contents to any folder.

    If you use a MacInstead, install Xcode and related command line tools using the Mac App Store, then open the terminal macOS and install the package manager Homebrew (a program that allows you to install, in turn, other programs via the command line) using the following command (to be confirmed by entering the Mac administration password).


    • /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)".

    Once Homebrew is installed, you need to install QPDF, again via the terminal, using the following command.

    • brew install qpdf.

    Now you can really take action and unlock your PDFs with QPDF. If you use a PC Windows, then start the Command Prompt and give the following commands.

    • CD "[QPDF folder]", where instead of [QPDF folder] you have to enter the full path of the folder where you extracted QPDF. If you don't want to waste time, you can simply drag the folder into the Prompt, after the command CD [space].
    • qpdf --decrypt input.pdf output.pdf, where instead of input.pdf you must enter full path and name of the file to be unlocked and instead of output.pdf full path and name of the file to be obtained as output (therefore the unlocked PDF ).

    How to unprotect a PDF with password

    If you use a Macinstead, you have to open the terminal and give the following command.

    • qpdf --decrypt input.pdf output.pdf, where instead of input.pdf you must enter the full path and name of the file to be unlocked and instead of output.pdf the full path and name of the file to be obtained as output.

    ATTENTION: unblocking a PDF that contains private information that you are not authorized to read can lead to a serious breach of privacy or, in some cases, even the commission of a crime. This guide has been written for illustrative purposes only and, therefore, I do not take any responsibility for the use that may be made of the information contained therein.

    How to unprotect a PDF with password

    add a comment of How to unprotect a PDF with password
    Comment sent successfully! We will review it in the next few hours.