Skip to content

Instantly share code, notes, and snippets.

@GroupDocsGists
Last active October 6, 2020 09:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GroupDocsGists/860444814f9530f71f311781b9f5e606 to your computer and use it in GitHub Desktop.
Save GroupDocsGists/860444814f9530f71f311781b9f5e606 to your computer and use it in GitHub Desktop.
Verify Digital Signatures in Documents using Java
// Verifying Digital Signatures in a PDF document using Signature API for Java by GroupDocs
Signature signature = new Signature("sample_signed.pdf");
DigitalVerifyOptions options = new DigitalVerifyOptions("certificate.pfx");
options.setComments("Test comment");
options.setPassword("1234567890");
// Verify Document Signatures
VerificationResult result = signature.verify(options);
if (result.isValid()) {
System.out.println("Document Verified Successfully !");
}
else {
System.out.println("Document Verification Failed.");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment