Sometimes, encrypted pdf file can be cumbersome. Especially in Mac OS X because default pdf viewer does not provide password decryption feature.
PDFLab does a good job in Mac OS X, but with the newest Snow Leopard, it does not work correctly. I still couldn’t find similar software as PDFLab.
Fortunately, in Linux box, you can easily remove password. To do this, your system should have installed ‘ghostscript’ and ‘poppler-utils’ packages. Following snippet is the simplified version of conversion script.
#!/bin/bash
filename=`basename $2 .pdf`
pdftops -upw $1 $filename.pdf
ps2pdf $filename.ps
First argument is password which is use to decrypt and second argument is the filename to convert.
Leave a Reply