Pages

Monday, January 11, 2016

remove password from pdf

remove password from pdf

This post is about removing password from pdf files. Simply batch decrypting of pdf files.Assuming that the  owner password of the document is known.

1. Convert PDF to PS 


pdftops

This command enable to convert pdf to ps ( post script files )

pdftops -upw <Owner_Password_Here> Input.pdf

For ex, if the owner password of the pdf is hello123

pdftops -upw hello123 Input.pdf

Now a postscript document is created in the same directory in the same name.(i.e) Input.ps

(i.e) the PDF file is decrypted into .ps file

2. Convert PS to PDF

ps2pdf

This command enable to convert  ps ( post script files ) to pdf

BE CAREFUL :
 
This command will overwrite the original PDF. So better take backup of the original PDF.

 ps2pdf <Input_File.ps>

3. Merge PDF into Single PDF 

 gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=merged.pdf  <Input_PDF_Files>




No comments:

Post a Comment