Read Digital Signature Information
You can read various pieces of information from a document's digital signature, including the signature itself, the signer of the signature, and certain details of the signer's digital certificate.
For a comprehensive list of retrievable information, please refer to the API Reference.
This example shows how to read digital signature information:
foreach (var signature in document.GetSignatureList())
{
signature.VerifySignatureWithDocument(document);
Console.WriteLine("Name: " + signature.Name);
Console.WriteLine("Location: " + signature.Location);
Console.WriteLine("Reason: " + signature.Reason);
foreach (var signer in signature.SignerList)
{
Console.WriteLine("Date: " + signer.AuthenDate);
foreach (var certificate in signer.CertificateList)
{
Console.WriteLine("Subject: " + certificate.Subject);
}
}
}
The Connection Between Digital Signatures, Signers, and Digital Certificates
A digital signature is generated by encrypting a document using the private key of the signer and then verifying the validity of the signature using the public key from the signer's certificate. The signature, signer, and digital certificate constitute a crucial part of digital signatures in a PDF document.
In most cases, one signature corresponds to one signer. However, in some situations, a digital signature can include multiple signers, each with their own certificate chain. This multi-signer mechanism can be very useful in certain application scenarios because it allows multiple entities to digitally sign the same document, each using their certificate and private key.