Setting License

How to apply a license to work with the selected Wordize module.
What is this page about?
This page explains how to apply a Wordize license in your .NET application, including loading licenses from files, streams, or embedded resources to activate full functionality, as well as applying a license to multiple Wordize products at once.

How to Apply a License

To activate your purchased Wordize product, use the SetLicense method and one of the options below.

  1. 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");
  1. Use a stream:

    • Load the license from a stream:
Wordize.Settings.SetLicense(MemoryStream(File.ReadAllBytes("Wordize.Net.lic")));
  1. 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.
Important to note:
Each product requires its own license. Ensure all required licenses are applied before usage.

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:

  1. Each product requires an individual license, which means licenses may have different expiration dates.
  2. You can activate multiple licenses at the same time, allowing you to use different Wordize products simultaneously.
  3. 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

  1. Q: How do I load a Wordize license that is embedded in my assembly?
    A: Add the .lic file to the project, set its Build Action to Embedded Resource, and call SetLicense with the resource name (without namespace). Example:

    Wordize.Settings.SetLicense("MyProject.Resources.Wordize.Net.lic");
    
  2. 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.

  3. 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.

  4. Q: What happens if I forget to set a license before calling Wordize APIs?
    A: Wordize throws a LicensingException indicating that the product is not licensed. Set the license early in the application startup before any Wordize functionality is used.

  5. Q: How can I verify that a license has been applied successfully?
    A: After calling SetLicense, you can attempt to use a feature that requires a license (e.g., saving a document to PDF). If no LicensingException is thrown, the license is active. Alternatively, catch any exception and log it for debugging.