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

Free Support Forum - aspose.com

Problem signing a PDF file

We are migrating the obsolete Aspose.Pdf.Kit library to Aspose.Pdf version 9.0.0 and experience difficulties with signing a document.

The example code in the JavaDoc gives the same compilation error as we experience, so this can be used as a reproduction for the problem:

 1  String inFile = TestPath + "example1.pdf";
 2  String outFile = TestPath + "signature.pdf";
 3  PKCS1 sig = new PKCS1("certificate.pfx", "password");
 4  sig.setReason ("Some reason");
 5  sig.setContact ("Smith");
 6  sig.setLocation ("New York");
 7  PdfFileSignature pdfSign = new PdfFileSignature(inFile, outFile);
 8  Rectangle rect = new Rectangle(100, 100, 200, 100);
 9  pdfSign.setSignatureAppearance ( TestPath + "butterfly.jpg");
10  pdfSign.sign(2, true, rect, sig);
11  pdfSign.save();
Line 3 does not compile and gives the following error:
- com.aspose.pdf.engine.security cannot be resolved to a type
- The type com.aspose.pdf.b.d cannot be resolved. It is indirectly referenced from required .class files

Hi Wim,

We are sorry for the inconvenience caused. While testing the scenario with the latest version of Aspose.Pdf for Java 9.0.0, We have managed to reproduce the reported issue and logged it in our bug tracking system as PDFNEWJAVA-33902 for further investigation and resolution. We will notify you via this thread as soon as it is resolved.

Please feel free to contact us for any further assistance.

Best Regards,

The issues you have found earlier (filed as PDFNEWJAVA-33902) have been fixed in Aspose.Pdf for Java 9.1.0.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.
(3)