6

This follows up my previous question: How to check if PDF has been digitally signed?.

Just in doubt a document has been digitally signed (e.g. with Adobe), how to remove the signature?

In particular, does "print to file" remove it?

2 Answers2

4

If you've got ghostscript installed try:

gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=%stdout% -c .setpdfwrite -f locked.pdf > unlocked.pdf

That would remove signature. If the pdf file has a password, then add parameter:

-sPDFPassword=$PASS

...and password would be disabled.

mzalazar
  • 161
  • 4
1

Thanks to the initial answer. However, read the comments, the real command is:

gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=%stdout% -f locked.pdf > unlocked.pdf

I just failed with the other command and succeeded with the shortened version. Unfortunately, I cannot edit the original answer because of the edit-queue, thus, here I provide the fixed version as new post. Don't vote up....