Monday, December 7, 2015

Remove password and merge PDF files in ubuntu

To remove password :

for file in *.pdf ; do qpdf --password=anil6053 --decrypt $file ./nopw/$fil
e; done


To merge pdf files,

pdftk *.pdf cat output mergedfile.pdf


If there are cases where some online tool has a limit on size of pdf file that it accepts, then the size of pdf can be reduced using the below command. You will of course loose some resolution...

Command to reduce the size of pdf :

gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -sOutputFile=smaller.pdf large.pdf

No comments: