Temporary license not working

Hello,

My organization recently requested a temporary license for Aspose.Total for Java. Our current goal is to read pdf, ppt and xsl files and convert them directly to Word for further manipulation.
However on my tests it seems that the temporary license is having no effect since for aspose slides I still see the watermark and on pdfs I’m only able to convert 4 pages, just like when we were evaluating the trial.

I’m correctly loading the license since no exception is thrown and I’ve even tried loading it in two different ways without sucess:

private void loadAsposeTotalLicense()
{
    com.aspose.words.License license = new com.aspose.words.License();
    try
    {
        //license.setLicense(new FileInputStream(new File("Aspose.Total.Java.lic")));
        license.setLicense(getClass().getResourceAsStream("/Aspose.Total.Java.lic"));
    }
    catch (Exception e)
    {
        throw new DefaultBusinessException("Error loading Aspose Total license");
    }
}

I’m confident that we are loading the license correctly as we currently own a paid license of Aspose.Words (which we are also loadingAspose.Total.Java.zip (805 Bytes)
) and we are following the exact same procedure.

I’m using maven to get the following versions of Aspose:

<dependency>
	<groupId>com.aspose</groupId>
	<artifactId>aspose-total</artifactId>
	<version>22.8</version>
	<type>pom</type>
</dependency>

<dependency>
	<groupId>com.aspose</groupId>
	<artifactId>aspose-words</artifactId>
	<version>22.8</version>
	<classifier>jdk16</classifier>
</dependency>

You can also find the license you provided attached. Can you please check if is there an issue with the license?

Thank you.

@m1tnick When you use several Aspose products in your project, you should apply the license for each of them.
https://docs.aspose.com/words/java/licensing/#using-multiple-aspose-products

In your case if you use Aspose.Words and Aspose.Slides, you should apply the license like this:

com.aspose.words.License awLic = new com.aspose.words.License();
awLic.setLicense("Aspose.Total.lic");

com.aspose.slides.License asLic = new com.aspose.slides.License();
asLic.setLicense("Aspose.Total.lic");
2 Likes

Thank you for your prompt reply.

Your solution worked, I can now test the product fully.

Thank you once again for the support.

1 Like