Table of Contents

Licensing

One CobaltPDF license key activates both CobaltPDF.WebKit (this library) and CobaltPDF (the Chromium edition). Keys are purchased at cobaltpdf.com/pricing.

Trial Mode

Without a license key the library operates in trial mode: all features work normally, but every generated PDF carries a trial watermark on every page.

Activating a License

Call CobaltEngine.SetLicense at the very start of your application — before Configure and before any render:

using CobaltPdf.WebKit;

CobaltEngine.SetLicense(Environment.GetEnvironmentVariable("COBALTPDF_LICENSE")!);

CobaltEngine.Configure(o =>
{
    o.MinSize = 1;
    o.MaxSize = 4;
});

In ASP.NET Core

CobaltEngine.SetLicense(builder.Configuration["CobaltPdf:LicenseKey"]!);

Store the key in appsettings.json (development only), Azure Key Vault, AWS Secrets Manager, or an environment variable — never commit it to source control.

Invalid or Expired Keys

If the key is invalid, forged, or expired, SetLicense throws InvalidOperationException with a descriptive message — the application fails fast rather than silently falling back to watermarked trial output.

Running both engines

Because the same key activates both libraries, you can run the WebKit and Chromium editions side by side (separate services, or even the same process via extern alias) and A/B output or migrate gradually. The shared PdfRequest wire model keeps clients engine-agnostic behind a service boundary.

For full license terms see the LICENSE.txt shipped in the NuGet package and cobaltpdf.com/licensing.