We're sorry GroupDocs doesn't work properply without JavaScript enabled.

Free Support Forum - groupdocs.com

Issue using GroupDocs.Signature.jar

when i use this jar in my java application I cant import any class from jar with sample code
// 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.”);
}

Hi @arefaat

Can you please share if you are using some IDE to add reference?
Let’s double check on following

  • To import the GroupDocs.Signature for Java 21.8 library in your project, please add a dependency to the project .pom file:

    com.groupdocs
    groupdocs-signature
    21.8

    And then rebuild the project.
    If you use any IDE (for example IntelliJ), then you can also add the library by local path (http://prntscr.com/20y8p9o):
    ProjectStructure>>Libraries>>Java>>local path to the library , to avoid the issues with class dependencies.

Please check with documentation below


how to run GroupDocs.Signature for Java demo examples.

Hope it will help
Waiting for your reply if this will help you!
Thank you!

I use eclipse Eclipse IDE for Java Developers (includes Incubating components)
Version: 2020-12 (4.18.0)
Build id: 20201210-1552

and I add the jar as a reference in my console application for testing it before creating maven project and add it in pom.xml file

Dear @arefaat

It looks like you are experiencing a reference issue.
May I ask you to copy the library to your [lib] folder in the project and import the Signature from the new path
So I would recommend using the way described here

Please share if this will help!
Thank you!