Setting License
How to Apply a License
To activate your purchased Wordize product, use the SetLicense method and one of the options below.
Use a license file:
- Obtain the license file (.lic) after purchase.
- Load and apply for the license in your application:
Wordize.Settings.SetLicense("Wordize.Net.lic");Use a stream:
- Load the license from a stream:
Wordize.Settings.SetLicense(MemoryStream(File.ReadAllBytes("Wordize.Net.lic")));Use an embedded resource:
- Add the license file as an embedded resource into your project.
- In your code, invoke SetLicense, which passes only the short name of the resource file.
How to Apply Licenses for Multiple Wordize Products
Each Wordize product has its own separate license and expiration date.
When purchasing multiple products, the following should be considered:
- Each product requires an individual license, which means licenses may have different expiration dates.
- You can activate multiple licenses at the same time, allowing you to use different Wordize products simultaneously.
- If using multiple products together, ensure that all required licenses remain active to avoid disruptions when working on complex tasks.
The following code example shows how to activate multiple licenses from files – for example, for the Wordize Core for .NET and Wordize Web for .NET modules:
Wordize.Settings.SetLicense("Wordize.Net.lic");
Wordize.Settings.SetLicense("Wordize.Web.Net.lic");FAQ
Q: How do I load a Wordize license that is embedded in my assembly?
A: Add the.licfile to the project, set its Build Action to Embedded Resource, and callSetLicensewith the resource name (without namespace). Example:Wordize.Settings.SetLicense("MyProject.Resources.Wordize.Net.lic");Q: Can the same license file be used for different Wordize products (e.g., Core and Web)?
A: No. Each Wordize product (Core, Web, etc.) requires its own license file because licenses are product‑specific and may have different expiration dates.Q: Are licenses purchased for the latest version of Wordize compatible with older versions of the library?
A: Licenses are not retro‑compatible. A license generated for a newer version can only be used with that version or newer. To use an older library you need a license that matches that version.Q: What happens if I forget to set a license before calling Wordize APIs?
A: Wordize throws aLicensingExceptionindicating that the product is not licensed. Set the license early in the application startup before any Wordize functionality is used.Q: How can I verify that a license has been applied successfully?
A: After callingSetLicense, you can attempt to use a feature that requires a license (e.g., saving a document to PDF). If noLicensingExceptionis thrown, the license is active. Alternatively, catch any exception and log it for debugging.