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

Free Support Forum - aspose.com

Pdf setlicense doesn't work

Hi,
I have a librairy created in .net 4.5.1 with visual studio 2015.
I put the license file in "Embedded Resource" of the librairy.
this librairy is used in a test console program and a service,

When I set the license with file name aspose excel, word... they work but not aspose.pdf.

Code with generate an exception
elicense.SetLicense("Aspose.Total.lic");
wlicense.SetLicense("Aspose.Total.lic");
pdfLicense.SetLicense("Aspose.Total.lic"); --> exception with license not found
noteLicense.SetLicense("Aspose.Total.lic");
slideLicense.SetLicense("Aspose.Total.lic");
diagramLicense.SetLicense("Aspose.Total.lic");

Work around
elicense.SetLicense("Aspose.Total.lic");
wlicense.SetLicense("Aspose.Total.lic");
using (Stream stm = GetType().Assembly.GetManifestResourceStream("MyLibrairy.Aspose.Total.lic"))
{
pdfLicense.SetLicense(stm);
}
noteLicense.SetLicense("Aspose.Total.lic");
slideLicense.SetLicense("Aspose.Total.lic");
diagramLicense.SetLicense("Aspose.Total.lic");

best regards

Hi Stephan,


Thanks for your inquiry. If you are using Aspose.Pdf for .NET 11.1.0 then please upgrade to latest version as we had fixed such issue in 11.2.0, otherwise please share your license file via email so we will test it and provide you information accordingly.

We are sorry for the inconvenience caused.

Best Regards,

Hi,

I will try it as soon as possible.

Best regards

Hi Stephan,


Adding more to Tilal’s comments, when using the license in Embedded mode, you need to add default namespace as prefix to license file name, so that its properly loaded. Please visit the following link for more information on Using as Embedded Resource