Aspose.pdf licence issue

Hi,

I have purchased aspose.pdf for java library.
But i could able download only license file. and used the below code to apply this licence.
com.aspose.pdf.licence.setLicense(); As per the instructions, i have placed the license file in the same folder where my jar file is placed. and it worked fine.

But when converted my java program to executable jar file, i am still getting the error saying licence file not found. I had to put the license file in the same folder where jar is there.

Is there any way to avoid this?

Please advise.

@manjularani

The license file should be present where you are going to deploy the application. You can however change the extension of the license file as well as use it as embedded resources in the application to distribute it along with it. Please let us know in case you have further concerns. We will further proceed to assist you accordingly.

Thank you. I changed the extension to jar and it worked fine.

But now, i am getting the below error - ERROR: At most 4 elements (for any collection) can be viewed in evaluation mode.

I have purchased Aspose.pdf for java library.

And i copied aspose-pdf-22.6-jdk16.jar file and Aspose.PDF.Java.lic files in one folder and included that in project build path.

It worked fine for 10days and now i am getting this error. ERROR: At most 4 elements (for any collection) can be viewed in evaluation mode.

Can you please let me know what needs to be done here. It it little urgent.

@manjularani

Please make sure to set license in the code before using any method of the API like given in the below article: