IronPDF License Keys

How to Get a License Key

Adding an IronPDF license key allows you to develop and deploy your project live without restrictions.

Start using IronPDF in your project today with a free trial.

First Step:
green arrow pointer


Step 1: Download the Latest Version of IronPDF

Install via NuGet

In Visual Studio, right-click on your project in the Solution Explorer and select "Manage NuGet Packages...". From there, simply search for IronPDF and install the latest version. Click "OK" to any dialog boxes that come up.

This will work in any C# .NET Framework project from Framework 4.6.2 and above, or .NET Core 2.0 and above. It will also work in VB.NET projects.

Install-Package IronPdf

https://www.nuget.org/packages/IronPdf

Install via DLL

Alternatively, the IronPDF DLL can be downloaded and manually installed to the project or GAC from https://ironpdf.com/packages/IronPdf.zip

Remember to add this statement to the top of any .cs class file using IronPDF:

using IronPdf;
using IronPdf;
Imports IronPdf
$vbLabelText   $csharpLabel

Step 2: Apply Your License Key

Set your IronPdf license key using code

Add this code to the startup of your application, before IronPDF is used. This method is universally effective and straightforward. It works for .NET Core and also for .NET Framework applications.

// Set the IronPdf license key
IronPdf.License.LicenseKey = "IRONPDF-MYLICENSE-KEY-1EF01";
// Set the IronPdf license key
IronPdf.License.LicenseKey = "IRONPDF-MYLICENSE-KEY-1EF01";
' Set the IronPdf license key
IronPdf.License.LicenseKey = "IRONPDF-MYLICENSE-KEY-1EF01"
$vbLabelText   $csharpLabel

You can validate that your software is licensed using either IronPdf.License.IsValidLicense(string LicenseKey) or the IronPdf.License.IsLicensed property.

Set your key using Web.Config or App.Config in .NET Framework Applications

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

<configuration>
  <appSettings>
    <add key="IronPdf.LicenseKey" value="IRONPDF-MYLICENSE-KEY-1EF01"/>
  </appSettings>
</configuration>
<configuration>
  <appSettings>
    <add key="IronPdf.LicenseKey" value="IRONPDF-MYLICENSE-KEY-1EF01"/>
  </appSettings>
</configuration>
XML

There is a known licensing issue between IronPdf version 2023.4.4 and 2024.3.3 in 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 IronPdf.License.IsLicensed returns true to verify.

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

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

  • Add a JSON file to your project called appsettings.json in the root directory of your project.
  • Add an 'IronPdf.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.
  • Ensure that IronPdf.License.IsLicensed returns true to verify.

File: appsettings.json

{
  "IronPdf.LicenseKey": "IRONPDF-MYLICENSE-KEY-1EF01"
}

Set your key in Azure Functions

Local

Add the license key into local.settings.json:

{
  "IsEncrypted": false,
  "Values": {
    "AzureWebJobsStorage": "UseDevelopmentStorage=true",
    "FUNCTIONS_WORKER_RUNTIME": "dotnet",
    "IronPdf.LicenseKey": "YOUR-LICENSE-KEY"
  }
}

Deployment

  1. Go to the Azure portal and sign in to your Azure account. In the search bar at the top of the portal, enter the name of your function app and select it from the list.
  2. Under Settings in the left pane, select Configuration.
  3. Select Application settings and click "New Application setting."
  4. Add Name and Value as follows:

    • Name: IronPdf.LicenseKey
    • Value: YOUR-LICENSE-KEY
  5. Save it.

Step 3: Test if your key has been installed correctly

// Check if a given license key string is valid
bool result = IronPdf.License.IsValidLicense("IRONPDF-MYLICENSE-KEY-1EF01");

// Check if IronPDF is licensed successfully
bool is_licensed = IronPdf.License.IsLicensed;
// Check if a given license key string is valid
bool result = IronPdf.License.IsValidLicense("IRONPDF-MYLICENSE-KEY-1EF01");

// Check if IronPDF is licensed successfully
bool is_licensed = IronPdf.License.IsLicensed;
' Check if a given license key string is valid
Dim result As Boolean = IronPdf.License.IsValidLicense("IRONPDF-MYLICENSE-KEY-1EF01")

' Check if IronPDF is licensed successfully
Dim is_licensed As Boolean = IronPdf.License.IsLicensed
$vbLabelText   $csharpLabel

Note: After adding a license, always remember to clean and republish your application to avoid potential mistakes in deployment.


Step 4: Get started with your project

Follow our tutorial on how to Get Started with IronPDF.


Questions?

If you have any questions, reach out to [email protected]

Frequently Asked Questions

How do I obtain a license key for IronPDF?

You can obtain a license key for IronPDF by purchasing it through their website. Once acquired, the key will allow you to develop and deploy your project live without restrictions.

How can I install IronPDF via NuGet?

In Visual Studio, right-click on your project in the Solution Explorer and select 'Manage NuGet Packages...'. Search for IronPDF and install the latest version. It works in any C# .NET Framework project from Framework 4.6.2 and above, or .NET Core 2.0 and above.

Can I manually install IronPDF?

Yes, you can manually install IronPDF by downloading the DLL from their website and adding it to your project or GAC. Remember to include the 'using IronPdf;' statement in your .cs files.

How do I apply my IronPDF license key in code?

Add the line 'IronPdf.License.LicenseKey = "YOUR-LICENSE-KEY";' to the startup of your application before using IronPDF. This is effective for both .NET Core and .NET Framework applications.

How can I set my license key using Web.Config in .NET Framework?

Add your key to thesection of your Web.Config or App.Config file as follows: '' to apply it globally.

What should I do if my IronPDF license key is not being recognized in ASP.NET projects?

There is a known issue with certain versions of IronPDF where the key in Web.config is not recognized. Visit IronPDF's troubleshooting article on their website for solutions.

How do I apply my license key in a .NET Core appsettings.json file?

Create an 'appsettings.json' file in the root directory of your project and add your license key under the 'IronPdf.LicenseKey' key. Ensure the file is set to 'Copy always' to the output directory.

How can I set my IronPDF license key in Azure Functions?

For local development, add the license key to 'local.settings.json'. For deployed functions, add it under Application settings in the Azure portal with 'Name' as IronPdf.LicenseKey and 'Value' as your license key.

How do I verify if my IronPDF license key is installed correctly?

Use 'IronPdf.License.IsValidLicense("YOUR-LICENSE-KEY")' or check 'IronPdf.License.IsLicensed' to ensure your software is properly licensed.

Who can I contact if I have further questions about IronPDF?

If you have any questions, you can reach out to support at [email protected].