// Optional: You can also set it via the static class IronPdf.License.IsValidLicense("YOUR-KEY-HERE"); This is the cleanest method for modern applications.
var builder = WebApplication.CreateBuilder(args); var ironPdfKey = builder.Configuration["IronPdf:LicenseKey"]; IronPdf.License.LicenseKey = ironPdfKey; Never hard-code keys in source control. Use Environment Variables. ironpdf license key
using IronPdf; // Go to the "Licensing" tab in your IronPDF dashboard to get your key. // Replace "YOUR-KEY-HERE" with the actual string. License.LicenseKey = "YOUR-KEY-HERE"; // Optional: You can also set it via
Step 1: Add to appsettings.json
[Test] public void IronPdfLicenseIsSet() { Assert.IsNotNull(IronPdf.License.LicenseKey); Assert.IsTrue(IronPdf.License.IsValidLicense(IronPdf.License.LicenseKey)); } Q1: Can I use the same license key on multiple developer machines? A: It depends on your license tier. The "Lite" license is usually for a single developer (one machine). "Professional" and "Unlimited" allow multiple developers. Using one key on ten machines for Lite is a violation of the EULA and will likely trigger a lock. Q2: Do I need a license key for a Docker container? A: Yes. In a Docker environment, set the IRONPDF_LICENSE environment variable in your Dockerfile or docker-compose.yml . Do not bake the key directly into the image file. Q3: My key was stolen. What do I do? A: Immediately log into the Iron Software portal and "Regenerate" your license key. This invalidates the old key instantly. Deploy the new key to your servers. Q4: Is there a free open-source alternative that doesn't require a key? A: Libraries like QuestPDF or PuppeteerSharp are free/OSS, but they lack the robust HTML-to-PDF rendering engine (Chrome-based) that IronPDF offers. You pay for the low-maintenance, high-fidelity conversion. Part 7: Legal and Compliance Warning (Important) A note on search intent: If you are searching for "IronPDF license key cracked" or "IronPDF keygen," stop. using IronPdf; // Go to the "Licensing" tab
{ "IronPdf": { "LicenseKey": "YOUR-KEY-HERE" } } Step 2: Read the configuration in Program.cs
Introduction In the world of .NET development, few libraries have garnered as much respect for PDF manipulation as IronPDF . Built by Iron Software, this library allows developers to create, read, edit, and sign PDF documents directly within C#, F#, and VB.NET without relying on Adobe Acrobat or external dependencies.