Using IronPrint License Keys
How to Get a License Key
Adding an IronPrint license key allows you to deploy your project live without restrictions or watermarks.
You can buy a license key or sign up for a free 30-day trial key here.
Step 1: Download the Latest Version of 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. Make sure to replace YOUR_LICENSE_KEY
with your actual IronPrint license key.
using IronPrint;
class Program
{
static void Main()
{
// Apply the IronPrint license key at the start of your application
IronPrint.LicenseKey = "YOUR_LICENSE_KEY";
// Verify that the license key is applied
if (IronPrint.License.IsLicensed)
{
Console.WriteLine("License is applied successfully.");
}
else
{
Console.WriteLine("Failed to apply the license.");
}
// Start using IronPrint features
// Your code logic goes here
}
}
using IronPrint;
class Program
{
static void Main()
{
// Apply the IronPrint license key at the start of your application
IronPrint.LicenseKey = "YOUR_LICENSE_KEY";
// Verify that the license key is applied
if (IronPrint.License.IsLicensed)
{
Console.WriteLine("License is applied successfully.");
}
else
{
Console.WriteLine("Failed to apply the license.");
}
// Start using IronPrint features
// Your code logic goes here
}
}
Imports IronPrint
Friend Class Program
Shared Sub Main()
' Apply the IronPrint license key at the start of your application
IronPrint.LicenseKey = "YOUR_LICENSE_KEY"
' Verify that the license key is applied
If IronPrint.License.IsLicensed Then
Console.WriteLine("License is applied successfully.")
Else
Console.WriteLine("Failed to apply the license.")
End If
' Start using IronPrint features
' Your code logic goes here
End Sub
End Class
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>
<configuration>
...
<appSettings>
<add key="IronPrint.LicenseKey" value="IRONPRINT.MYLICENSE.KEY.1EF01"/>
</appSettings>
...
</configuration>
There is a known licensing issue with the IronPrint version released before 2024.3.6 on projects:
- ASP.NET projects
- .NET Framework version >= 4.6.2
The key stored in a Web.config
file is NOT being picked up and used by the product. Visit the 'Setting License Key in Web.config' troubleshooting article to learn more.
Ensure that IronPrint.License.IsLicensed
returns true
to verify that your application is licensed correctly.
Set your license key using a .NET Core appsettings.json file
To apply a key globally to your .NET Core application:
- 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:
using IronPrint;
class LicenseCheck
{
static void Main()
{
// Check if the license is applied
bool isLicensed = IronPrint.License.IsLicensed;
Console.WriteLine(isLicensed ? "License applied." : "License not applied.");
}
}
using IronPrint;
class LicenseCheck
{
static void Main()
{
// Check if the license is applied
bool isLicensed = IronPrint.License.IsLicensed;
Console.WriteLine(isLicensed ? "License applied." : "License not applied.");
}
}
Imports IronPrint
Friend Class LicenseCheck
Shared Sub Main()
' Check if the license is applied
Dim isLicensed As Boolean = IronPrint.License.IsLicensed
Console.WriteLine(If(isLicensed, "License applied.", "License not applied."))
End Sub
End Class
Validate the License Key
To ensure the validity of your license or trial key, you can use the following code snippet:
using IronPrint;
class ValidateLicense
{
static void Main()
{
// Validate license or trial key
bool isValid = IronPrint.License.IsValid;
Console.WriteLine(isValid ? "License key is valid." : "License key is invalid.");
}
}
using IronPrint;
class ValidateLicense
{
static void Main()
{
// Validate license or trial key
bool isValid = IronPrint.License.IsValid;
Console.WriteLine(isValid ? "License key is valid." : "License key is invalid.");
}
}
Imports IronPrint
Friend Class ValidateLicense
Shared Sub Main()
' Validate license or trial key
Dim isValid As Boolean = IronPrint.License.IsValid
Console.WriteLine(If(isValid, "License key is valid.", "License key is invalid."))
End Sub
End Class
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 purchasing 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.
Frequently Asked Questions
How do I obtain an IronPrint license key?
You can buy a license key by visiting the IronPrint licensing page or sign up for a free 30-day trial key.
How do I apply my IronPrint license key in C#?
You can apply the license key by adding the code `IronPrint.LicenseKey = "YOUR_LICENSE_KEY";` to the startup of your application, before using IronPrint.
How can I set my IronPrint license key using Web.Config or App.Config?
Add the license key to your config file in appSettings using the syntax: `
What should I do if the license key in Web.config is not being picked up?
Visit the 'Setting License Key in Web.config' troubleshooting article on the IronPrint website for solutions.
How can I apply my IronPrint license key using a .NET Core appsettings.json file?
Add a 'IronPrint.LicenseKey' key to your appsettings.json file with your license key as the value. Ensure the file properties include 'Copy to Output Directory: Copy always'.
How can I verify if my IronPrint license key is applied correctly?
Use the code snippet `bool isLicensed = IronPrint.License.IsLicensed;` to check if the license is applied.
How do I validate my IronPrint license key?
Use the code snippet `bool isValid = IronPrint.License.IsValid;` to validate your license or trial key.
What can I do if I have questions or need support with IronPrint?
You can reach out to IronPrint support by emailing support@ironsoftware.com or by visiting the IronPrint section on their website for more resources.
What are the steps to get started with IronPrint?
Download the latest version of IronPrint, apply your license key, validate it, and follow the comprehensive tutorial on the IronPrint website.