Using IronPrint License Keys

Get Your License Key

IronPrint license keys allow you to deploy your project live.

Licenses start at just $749 and include one free year of support and updates.

You can also try IronPrint free for 30 days with a trial license key.


Step 1: Download the Latest Version of IronPrint

C# NuGet Library for

Install with NuGet

Install-Package IronPrint

Step 2: Apply Your License Key

Set your license using code

Add this code to the startup of your application, before IronPrint is used.

:path=/static-assets/print/content-code-examples/how-to/license-keys-apply.cs
IronPrint.License.LicenseKey = "IRONPRINT.MYLICENSE.KEY.1EF01";
IronPrint.License.LicenseKey = "IRONPRINT.MYLICENSE.KEY.1EF01"
VB   C#

Set your license using Web.Config or App.Config

To apply a key globally to your application using Web.Config or App.Config, add the following key to your config file in appSettings.

<configuration>
    ....
    <appSettings>
        <add key="IronPrint.LicenseKey" value="IRONPRINT.MYLICENSE.KEY.1EF01"/>
    </appSettings>
    ....
</configuration>
XML

Setting license key in web.config issue

There is a known licensing issue: in ASP.NET projects targeted .NET framework version >= 4.6.2. The key stored in a web.config file will NOT be picked up and used by the product.

To work around this issue it is recommended to read license key using ConfigurationManager from web.config in the code and apply it to the License.LicenseKey.

Example

With the above XML file, we can use ConfigurationManager to retrieve and pass the license key value to IronPrint.License.LicenseKey property.

using System.Configuration;

string licenseKey = ConfigurationManager.AppSettings["IronPrint.LicenseKey"];

IronPrint.License.LicenseKey = licenseKey;
using System.Configuration;

string licenseKey = ConfigurationManager.AppSettings["IronPrint.LicenseKey"];

IronPrint.License.LicenseKey = licenseKey;
Imports System.Configuration

Private licenseKey As String = ConfigurationManager.AppSettings("IronPrint.LicenseKey")

IronPrint.License.LicenseKey = licenseKey
VB   C#

Ensure that IronPrint.License.IsLicensed returns true to verify.


Set your license key using a .NET Core appsettings.json file

To apply a key globally to your application to a .NET Core:

  • Add a JSON file to your project called appsettings.json in the root directory of your project
  • Add a 'IronPrint.LicenseKey' key to your JSON config file. The value should be your license key.
  • Ensure that the file properties include Copy to Output Directory: Copy always

File: appsettings.json

{
    "IronPrint.LicenseKey":"IRONPRINT.MYLICENSE.KEY.1EF01"
}

Step 3: Validate Your License Key

Verify the Installed License Key

To verify whether the license key has been applied correctly, you can check the IsLicensed property. Use the following code snippet:

:path=/static-assets/print/content-code-examples/how-to/license-keys-is-licensed.cs
// Check if the license key has been applied
bool licensed = IronPrint.License.IsLicensed;
' Check if the license key has been applied
Dim licensed As Boolean = IronPrint.License.IsLicensed
VB   C#

Validate the License Key

To ensure the validity of your license or trial key, you can use the following code snippet:

:path=/static-assets/print/content-code-examples/how-to/license-keys-is-valid.cs
// Check if a given license key string is valid
bool valid = IronPrint.License.IsValidLicense("IRONPRINT.MYLICENSE.KEY.1EF01");
' Check if a given license key string is valid
Dim valid As Boolean = IronPrint.License.IsValidLicense("IRONPRINT.MYLICENSE.KEY.1EF01")
VB   C#

If the return value is True, it means the key is valid, and you can proceed with using IronPrint. However, if the return value is False, it indicates that the key is invalid.


Step 4: Getting Started with Your Project

To get started with IronPrint, we highly recommend following our comprehensive tutorial on how to Get Started with IronPrint. This tutorial offers detailed instructions and examples to help you grasp the basics of using IronPrint.


Questions or Need Support?

To use IronPrint in live projects, you'll require a paid or trial license key, which you can obtain by purchase a license. The trial license is available by visiting this link.

For a comprehensive collection of code examples, tutorials, licensing details, and extensive documentation, please visit the IronPrint section on our website.

If you have any questions, feel free to reach out to support@ironsoftware.com.