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 the following:

  • To import the GroupDocs.Signature for Java 21.8 library in your project, add a dependency to the project’s pom.xml:
<dependency>
    <groupId>com.groupdocs</groupId>
    <artifactId>groupdocs-signature</artifactId>
    <version>21.8</version>
</dependency>

Then rebuild the project.

  • If you use an IDE (e.g., IntelliJ), you can also add the library by a local path (see screenshot: http://prntscr.com/20y8p9o):

    Project Structure → Libraries → Java → Local path to the library to avoid issues with class dependencies.

Please check the documentation below:

GroupDocs.Signature for Java – How to run examples

Hope it will help.
Waiting for your reply if this helps 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!