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

Free Support Forum - aspose.com

PDF license not being accepted

I am using aspose words and pdf in the same application, deployed on tomcat. I am placing both the words and pdf jar files in tomcat/lib directory, with the license there as well. The words license is accepted, the pdf license is not. Here is the top part of the stack trace:

11:02:42,050 ERROR [com.r5.alliant.alf.repo.actions.NameAndVersionFooterActionExecutor] ERROR SETTING ASPOSE LICENSE!!
class com.aspose.pdf.internal.hv.dw: Invalid URI: The URI scheme is not valid.
com.aspose.pdf.internal.hv.dr.N(Unknown Source)
com.aspose.pdf.internal.hv.dr.a(Unknown Source)
com.aspose.pdf.internal.hv.dr.(Unknown Source)
com.aspose.pdf.internal.hv.dr.(Unknown Source)
aspose.pdf.internal.al.c(Unknown Source)
aspose.pdf.internal.al.a(Unknown Source)
aspose.pdf.a.setLicense(Unknown Source)
com.aspose.pdf.License.setLicense(Unknown Source)

I am using the following code to set the licenses (lic is just the words license file):

License lic = new License();
log.warn(“Success setting license for aspose words component”);
com.aspose.pdf.License pdfLic = new com.aspose.pdf.License();
log.warn(“Success setting license for aspose pdf component”);

Any help would be appreciated.

Using words version 14.1, and pdf version 9.1

Hi Brian,

Thanks for contacting support.

We are working on preparing the requirement environment and will share our findings, shortly.

When I switched to loading from a stream, it worked fine…

Hi Brian,

As the error indicates, there was some issue with the string/URI which you were using to specify the license file path. However, we are glad to hear that your problem is fixed using Stream instance. Please continue using our API and in the event of any further query, please feel free to contact.

PS, i use following code lines to instantiate license placed over my system and I am unable to notice any problem.

com.aspose.pdf.License license = new com.aspose.pdf.License();