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?
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?
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.
-c
provides commands to execute and necessitates-f
after in order to give input files. I need a way to check that the signature was effectively removed though... – PlasmaBinturong Jan 15 '21 at 17:30-c .setpdfwrite
seems to work fine for me; out of interest, why did you include it in your command? – Wolfgang Oct 23 '21 at 22:05pdfsig unlocked.pdf
(from thepoppler-tools
package). It will print “File 'unlocked.pdf' does not contain any signatures” if the PDF is unsigned. – Wolfgang Oct 23 '21 at 22:09poppler-utils
for me. Does it work for Adobe signatures? – PlasmaBinturong Nov 09 '21 at 14:31