Using IronPdf License Keys
If you decide to purchase a license for IronPDF, you will instantly receive a license key as soon as your payment has cleared. This License will be displayed on the checkout screen and also be sent by email.
Setting your IronPdf license key using code
Add this code to the startup of your application, your before IronPDF is used.
IronPdf.License.LicenseKey = "IRONPDF-MYLICENSE-KEY-1EF01";
IronPdf.License.LicenseKey = "IRONPDF-MYLICENSE-KEY-1EF01"
Setting your IronPdf license key 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="IronPdf.LicenseKey" value="IRONPDF-MYLICENSE-KEY-1EF01"/> </appSettings> .... </configuration>
To test if your key has been installed correctly
bool result = IronPdf.License.IsValidLicense("IRONPDF-MYLICENSE-KEY-1EF01");
Dim result As Boolean = IronPdf.License.IsValidLicense("IRONPDF-MYLICENSE-KEY-1EF01")