Class License
Allows IronPdf license keys to be applied globally across an application.
Inheritance
Namespace: IronPdf
Assembly: IronPdf.dll
Syntax
public static class License : Object
Properties
IsLicensed
Determines whether this instance of IronPDF is Licensed.
Will return false unless a LicenseKey is set to a valid trial or full license key in IronPdf.License.LicenseKey, Web.Config , App.Config or appsettings.json in .Net Core.
See https://ironpdf.com/licensing/ and https://ironpdf.com/docs/license/license-keys/
Declaration
public static bool IsLicensed { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | True if the license key given is valid. |
LicenseKey
Removes watermarks. Get Licensed at https://ironpdf.com/licensing
For .Net framework applications, a license key can alternatively be added to Web.Config or App.Config XML file using <add key="IronPdf.LicenseKey" value="IRONPDF-LICENSE-KEY"/> within the appSettings tag. See https://ironpdf.com/docs/license/license-keys/
For .Net Core applications, a license key may be added to appsettings.json where the key name is "IronPdf.LicenseKey" and the value is a valid IronPDF trial or full license key.
See https://ironpdf.com/licensing/ for licensing options.
Declaration
public static string LicenseKey { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
Methods
DisableAppAnalytics()
Disables AppAnalytics for IronPdf. Limitations apply.
Declaration
public static void DisableAppAnalytics()
IsValidLicense(String)
Determines whether a string license is valid upon the validation process
------------------------------------------------
Usage:
bool checkValidLicense = IronPdf.License.IsValidLicense(IronPdf.License.LicenseKey);
------------------------------------------------
Declaration
public static bool IsValidLicense(string LicenseKey)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | LicenseKey | IronPdf license key as a string |
Returns
| Type | Description |
|---|---|
| System.Boolean |
|
Remarks
Important Notes:
â— Validation Behavior: This method will return false for expired keys, even if they were previously valid. This includes:
- Expired TEAM KEY
- Expired Subscription Key
- Expired Enterprise Key
ðŸ—ï¸ Get a Trial Key: Learn more and get a trial key
ðŸ—ï¸ Commercial Licensing: View commercial licensing options
📚 API Reference:Full API Documentation