We have PDF files that cannot be edited because they have been digitally signed. It is more important to us to be able to edit the PDF, then it is to preserve the digital signature.
How can I remove the signatures so it can be edited?
There are three things you need to do.
- First you need to find all the digital signature fields, and delete any signatures.
for(itr=doc.GetFieldIterator(); itr.HasNext(); itr.Next())
Field field = itr.Current();
if(field.GetType() == Field.Type.e_signature)
field.GetSDFObj().Erase(“V”); // remove crypto component
field.GetSDFObj().Erase(“AP”); // remove visual component
- Delete the signature flags entry.
- Delete any permissions entry
Finally, save the file so all the now unused entries are erased completely.