Error updating our license file (.lic)

Hello,

We have some troubles updating the license file (aspose.pdf.kit.lic), obtaining the evaluation watermark inside the PDF docs when we send they to printer.

We have a .Net desktop app which uses aspose.pdf.kit to print some pdf files. In order to update our aspose license, we have overwritten the .lic file inside the app folder, but the water mark still appears on our printed docs.

Can anybody tell us whats wrong in our update process?

Thanks.

Joan Miquel

Hi Joan,

Please delete the existing license file and then place the new file in the same location. Moreover, please make sure that the Aspose.Pdf.Kit.License class is able to read the license and there is no problem in the code i.e. it’s not commented or some exception captured in the catch block.

Please see if this helps. If you still find the problem then please do let us know.
Regards.

Hi Shahzad,

Thanks for your answer, we have located where the problem is.

The piece of code that fails was a shared function. We usually set the license inside a load event handler or in a init procedure. In this case, a shared function does not create any object instance, and therefore does not execute any init procedure.

So, we just need include these lines of code in the head of our shared function:

Dim license As Aspose.Pdf.Kit.License = New Aspose.Pdf.Kit.License
license.SetLicense("Aspose.Pdf.Kit.lic")

and all runs fine.

Thanks, and regards.

Joan Miquel

Hi Joan,

I’m glad to know that this issue is resolved at your end. If you need any further assistance from our side, please do let us know.

Regards,