GroupDocs.Signature offers an ability to findΒ Digital signatures that are applied to document and returns its digital signature certificate. Please follow these steps to search for DigitalΒ signatures within the document:
Create new instance ofΒ SignatureΒ class and pass source document path as a constructor parameter.
Instantiate theΒ DigitalSearchOptionsΒ object according to your requirements and specify search options
This example shows how to search for Digital signature in the document and analyze digital signature certificate.
using(Signaturesignature=newSignature("spreadsheet.xlsx")){// search for signatures in documentList<DigitalSignature>signatures=signature.Search<DigitalSignature>(SignatureType.Digital);Console.WriteLine("\nSource document contains following signatures.");foreach(vardigitalSignatureinsignatures){Console.WriteLine("Digital signature found from {0} with validation flag {1}. Certificate SN {2}",digitalSignature.SignTime,digitalSignature.IsValid,digitalSignature.Certificate?.SerialNumber);}}
Advanced Usage Topics
To learn more about document eSign features, please refer to theΒ advanced usage section.
More resources
GitHub Examples
You may easily run the code above and see the feature in action in ourΒ GitHub examples: