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

Free Support Forum - aspose.com

Linking .lic file


I am having .lic file for converting word,slide,diagram and cells to PDF. Can you please let me know how to integrate this file in my .net code.

I am having the below code but it is throwing error at the setlicense line. I have added Aspose.Pdf.lic to the project solution.

Aspose.Cells.License l = new Aspose.Cells.License();
Aspose.Words.License l1 = new Aspose.Words.License();
Aspose.Diagram.License l2 = new Aspose.Diagram.License();
Aspose.Slides.License l3 = new Aspose.Slides.License();

Hi Chethan,

Thanks for your inquiry. Yes, you have to set a license separately for each Aspose product you are using. For example, if you are using Aspose.Words and Aspose.Cells, code for setting the license will look like this:

Aspose.Words.License awLic = new Aspose.Words.License();u1:p</u1:p><o:p></o:p>


Aspose.Cells.License cellsLicense = new Aspose.Cells.License();<o:p></o:p>


It could be that the exception occurs because you are using Aspose.Pdf license file. You need Aspose.Total license to be able to set license for each product. Could you please double check if you do have a Aspose.Total license?

If we can help you with anything else, please feel free to ask.

Best regards,

Thank you Awais.

Hi Awais
I checked again and what we have is Aspose.PDF.lic file.
Can you tell me what is the purpose of Aspose.PDF.lic
if this file doesn’t solve our purpose of converting docx,pptx,vsd files to PDF then how do we godhead with this? Please suggest

Hi Chethan,

Thanks for your inquiry.

Aspose offers different components to deal with different file formats; for example, Aspose.Words enables your applications to perform a great range of document processing tasks on Microsoft Word documents (i.e. DOC, DOCX, RTF etc) while Aspose.Pdf is designed to work with PDF documents. In case you want to use both of these products, you would be needing two license files i.e. Aspose.Words.lic and Aspose.Pdf.lic to license Aspose.Words and Aspose.Pdf components separately. And in case you want to use all products offered by Aspose (Aspose.Total component package), then you need to get an Aspose.Total.lic license file.

Even if you have a single license file for all components, for example ‘Aspose.Total.lic’, you still need to call License.SetLicense separately for each Aspose product you are using in your application. Please note that each Aspose product has a License class in its namespace. For example, Aspose.Words has License and Aspose.Cells has Aspose.Cells.License class. Using the fully qualified class name allows you to avoid any confusion about which license is applied to which product. However, you can not use Aspose.Pdf.lic file to license any other Aspose product other than Aspose.Pdf.

Please let me know if I can be of any further assistance.

Best regards,