Class PdfLicense
- Namespace
- SoftZenPdf
- Assembly
- SoftZenPdf.dll
Activates a SoftZenPdf license. Without a license key the library runs in evaluation mode: everything works, but every page it saves carries a small "evaluation copy" mark at the top.
public static class PdfLicense
- Inheritance
-
PdfLicense
- Inherited Members
Examples
PdfLicense.SetKey(builder.Configuration["SoftZenPdf:LicenseKey"]!);
Remarks
Set the key once when your application starts, before creating documents, either in code with SetKey(string)
or through the SOFTZENPDF_LICENSE_KEY environment variable. Keys are checked offline: nothing is sent over
the network.
Paid licenses include a year of updates: a key works with every SoftZenPdf version released until its UpdatesUntil date, forever. Compare it with ReleaseDate.
Fields
- EnvironmentVariable
The environment variable read for a license key when SetKey(string) has not been called.
Properties
- IsLicensed
Whether a valid license is active. When false, saved documents carry the evaluation mark; Status says why.
- ReleaseDate
The date this version of SoftZenPdf was released. A license key works with this version if its UpdatesUntil date is on or after it.
- Status
A one-line description of the license state for logs, such as "Licensed to Acme Ltd (Professional, 3 developers, updates until 2027-09-30)" or the reason SoftZenPdf is in evaluation mode.
Methods
- SetKey(string)
Activates a license key for the whole process. Call it once at startup, before creating documents; it replaces any key set earlier or read from EnvironmentVariable.