Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Steps for Adding Digital Signature to PDF Documents
using GroupDocs.Signature;
using GroupDocs.Signature.Domain;
using GroupDocs.Signature.Options;
DigitalVerifyOptions options = new DigitalVerifyOptions("certificate.pfx")
{
Comments = "Test comment"
};
using (Signature signature = new Signature("sample.pdf"))
{
// Your code goes here.
}
if (result.IsValid)
{
Console.WriteLine("\nDocument was verified successfully!");
}
else
{
Console.WriteLine("\nDocument failed verification process.");
}
// verify document signatures
VerificationResult result = signature.Verify(options);
using GroupDocs.Signature;
using GroupDocs.Signature.Domain;
using GroupDocs.Signature.Options;
using (Signature signature = new Signature("sample.pdf"))
{
DigitalVerifyOptions options = new DigitalVerifyOptions("certificate.pfx")
{
Comments = "Test comment"
};
// verify document signatures
VerificationResult result = signature.Verify(options);
if (result.IsValid)
{
Console.WriteLine("\nDocument was verified successfully!");
}
else
{
Console.WriteLine("\nDocument failed verification process.");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.