Signature Information
Contents
[
Hide
]
Get signature information
Use this workflow when you need to inspect who signed a PDF and what signature metadata was stored.
Steps
- Create a
PdfFileSignatureinstance and bind the signed PDF. - Read the signature collection and select a signature name.
- Call the signature-information accessors for signer name, date, reason, and location.
- Close the facade object when finished.
Java example
public static void getSignatureInformation(Path inputFile) {
PdfFileSignature pdfSignature = new PdfFileSignature();
try {
pdfSignature.bindPdf(inputFile.toString());
SignatureName signatureName = pdfSignature.getSignatureNames().get_Item(0);
System.out.println("Signature Names: " + pdfSignature.getSignNames());
System.out.println("Signer: " + pdfSignature.getSignerName(signatureName));
System.out.println("Date: " + pdfSignature.getDateTime(signatureName));
System.out.println("Reason: " + pdfSignature.getReason(signatureName));
System.out.println("Location: " + pdfSignature.getLocation(signatureName));
} finally {
pdfSignature.close();
}
}