Remove password protection from pdf file


I bought a book, fairly expensive and high (more than a thousand pages), with attached a complete copy of the same book on CD in PDF format, useful for any research. Perfect!! Maybe all publishers did so …

There’s just one little problem: all the files provided with the book are protected by a password that, in practice, prevents any changes or assembly operation with other pdf. The intention publisher is therefore to let me use the CD only as it is … but, a bit ‘as a matter of principle (I can not stand my limitations to freedom of computing) and a bit ‘for a problem practical, I will remove this protection.

The practical problem to which I refer is that, since the book is divided into over 190 separate pdf, I want to assemble them all in one pdf, in the order that it seems to me, creating a list of bookmarks as I please and adding another outer material the book itself. My liberty is impeded by the stupid password, then “I have to” take it off 🙂

Remove password

In the web there are several ways to remove the password to a PDF file , but honestly no one satisfies me, for a few reasons: in almost all cases, the free little programs with which groped to remove the password have various limitations, often do not have a version for GNU / Linux, are not free, I do not have access to the source code and therefore can not study how they work; other online services, always free, “forced” to send to an external server my files, resulting in lack of confidence (I want to do everything on my computer, without giving the pdf to strangers) , impracticality (make one by one the upload of almost two hundred files has not just the maximum) and, also in this case, lack of the possibility to understand the basis of what logic function. The little programs business even consider them: I have already spent so much for the book and not want to spend any more money.

How to Remove Password from Adobe PDF Files

After all these premises, a gift that you’re reading a practical, very simple and immediate way to unprotect a pdf file.Installed package pdfjam (which is free software under the GPL) and then by the end of the following command:

pdfjam --suffix new filename.pdf

Within seconds it will create a new PDF (using pdftex ) which will be identical to the original pdf (and with the same embedded fonts). Of course this is possible, as in this case, only if the pdf of departure is readable without knowing the password; Furthermore, I can not guarantee that this method will always work: I can only say that in my case it works perfectly. According to the documentation pdfjam, the only information that will be lost are any bookmarks and any links within the PDF.

Remove password protection pdf

Finally, in a minute I unprotected all 190 pdf with this simple Bash script:

#! / Bin / bash 
for file in * .pdf 
do 
 pdfjam --suffix new file $ 
 echo "$ file done" 
done
Happy hacking everyone