Issue of loading license file

Our firm recently purchased Aspose.word project, everything works well. Now we are interested in Aspose.pdf.kit, we are evaluating this product, and we got a 30 days temporay license from a salesperson at Aspose, the file looks ok to us, but once I load this license file, I keep getting the error message "The license is not valid for this product", I coded exactly the same way as I did for loading Aspose.word license file.

Aspose.word:

InputStream licenseStream = getClass().getResourceAsStream("/Aspose.Words.lic.xml");

License license = new License();

license.setLicense(licenseStream);

Aspose.Pdf.Kit:

InputStream licenseStream = getClass().getResourceAsStream("/Aspose.Pdf.Kit.lic.xml");

License license = new License();

license.setLicense(licenseStream);

Please note I put both license files in the same folder, one works and another one does not work, Can you please help me out?

Than ks

Alex

Hi Alex,

The license file should be having .lic extension not .xml. Could you please try using the original license file with .lic extension? If you still find the same issue then please do let us know.

We’re sorry for the inconvenience and looking forward to help you out.
Regards,

It is still not work after I took your advise, I actually tried both, with xml and .lic as the extensions. I still got the same error message: The license is not valid for this product.

I need your help!

Hi Alex,

Please refer each License class with the complete namespace. For example, if you want to use Aspose.Words and Aspose.Pdf.Kit licenses, please use them as shown in Aspose.Pdf.Kit for Java license setting code snippet.

I hope this is going to resolve your issue. If you still find any problem, please do let us know.
Regards,