Signature Management
Contents
[
Hide
]
Remove a signature
Use this workflow when an existing digital signature should be removed from the document.
Steps
- Create a
PdfFileSignatureinstance and bind the signed PDF. - Read the signature collection and select a signature name.
- Call
removeSignaturewith that name. - Save the updated file and close the facade object.
Java example
public static void removeSignature(Path inputFile, Path outputFile) {
PdfFileSignature pdfSignature = new PdfFileSignature();
try {
pdfSignature.bindPdf(inputFile.toString());
SignatureName signatureName = pdfSignature.getSignatureNames().get_Item(0);
pdfSignature.removeSignature(signatureName);
pdfSignature.save(outputFile.toString());
} finally {
pdfSignature.close();
}
}
The current Java sample set does not include a separate method for removing the associated signature field after deleting the signature.