2016-11-14

Remove password from PDF files (protected from printing)

Who knows why but I have a bulk of password protected file received from an an administration. Of course these are my files and I have the password.
I can only read the files with acroread or other pdf viewers but I cannot print these or save without password.

The problem is that I need to print these file for another administration... Here is how I solved the problem :

for f in *.pdf; do pdftk "$f" input_pw passowrdHere output "nopw_$f"; done



This line of bash will, for each *.pdf file of the folder, open the pdf using the password and save the non protected file with nopw_ as prefix.