If we take Aspose total do we need to set the license for each SDK ? or can we set it globally once?
When you purchase Aspose.Total, you can set the license globally for all the SDKs included in the package. This means you only need to set the license once in your application, and it will apply to all the Aspose products you are using.
Here’s a simple example of how to set the license globally:
// Create a new license object
Aspose.Words.License license = new Aspose.Words.License();
// Set the license from a file
license.SetLicense("Aspose.Total.lic");
Make sure to call this code at the start of your application, before using any Aspose products. This way, you won’t need to set the license for each individual SDK separately.
For further information on licensing, please consult the official Aspose documentation.
If you purchase Aspose.Total, which is a suite bundling all Aspose file format SDKs (like Aspose.Words, Aspose.Cells, Aspose.PDF, Aspose.Slides, Aspose.Email, etc.), you still need to set the license for each individual SDK/API you use in your application. Each product has its own namespace and License class, so you need to initialize the license separately for each SDK you are using. You will do license initialization/setting for your desired SDKs at the start of your app only (no need to do it multiple times). There is no global license setter that automatically applies to all SDKs at once.
For example, if you are using Aspose.Words
, Aspose.Cells
, and Aspose.Pdf
APIs, you’d do as following:
Aspose.Words.License wordsLicense = new Aspose.Words.License();
wordsLicense.SetLicense("Aspose.Total.lic");
Aspose.Cells.License cellsLicense = new Aspose.Cells.License();
cellsLicense.SetLicense("Aspose.Total.lic");
Aspose.Pdf.License pdfLicense = new Aspose.Pdf.License();
pdfLicense.SetLicense("Aspose.Total.lic");
Hope, this helps a bit.
You are welcome. If you have any additional questions or comments, please do not hesitate to contact us again.