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

Free Support Forum - aspose.com

License type differs between Products

I have an Aspose.Total license. I’m using it to license two products and I’m following the directions here https://docs.aspose.com/pdf/java/licensing/#using-multiple-products-from-aspose

I do

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

pdfLicense.setLicense(“Aspose.Total.Java.lic”);

com.aspose.cells.License cellsLicense = new com.aspose.cells.License();

cellsLicense.setLicense(“Aspose.Total.Java.lic”);

Now I want to check if the licenses are set.

com.aspose.cells.License.isLicenseSet() is fine but

com.aspose.pdf.License.isLicenseSet() shows an error.

Looking into the source I see that the License under package com.aspose.cells has a stub

public static boolean isLicenseSet() {

where as the License under package com.aspose.pdf does not.

Why is there this difference in the methods offered by the two Licenses?

Michael

also here are the versions I’m using:


<aspose-cells.version>8.8.0</aspose-cells.version>
<aspose-pdf.version>11.5.0</aspose-pdf.version>

Hi Michael,


Thanks for contacting support.

In order to determine if the license for Aspose.Pdf for Java has been initialized, please try using following code lines.

[Java]

if(com.aspose.pdf.Document.isLicensed())<o:p></o:p>

System.out.println(“license
initialized…”
);

Thanks. That works. so it looks like checking if licensed is not uniform across aspose products. It would be beneficial to others to correct the wiki https://docs.aspose.com/display/cellsjava/Licensing (under header ‘Validate the License’) since the aspose.pdf.License class does not contain the method. Also the wiki refers to it as a field, which it is not.

Hi Michael,


Thanks for sharing the feedback.

Yes you are correct. There is a change in terms of implementation for license check when using Aspose.Pdf for Java. However I am in coordination with product team to check for any specific details for this change. Furthermore, we are working on fixing the above stated problem related to Aspose.Cells for Java and will get back to you soon.

We are sorry for this delay and confusion.