zplCore.comzplCore.com

ZplCoreLicense

public static class ZplCoreLicense

Licence check of zplCore (EULA section 7). The key is verified offline against its signature – no network access, no telemetry, works air-gapped. Without a valid key everything works in evaluation mode: previews, images, PDF and SVG documents and generated labels carry a visible "zplCore.com TRIAL" watermark.
Sources, in this order: ZplCoreLicense.Register / ZplCoreLicense.RegisterFile from code, the environment variable ZPLCORE_LICENSE (the key itself), the environment variable ZPLCORE_LICENSE_FILE (path of a file with the key) and the file zplcore.license next to the application. ZplCoreLicense.Register(builder.Configuration["ZplCore:License"]!);

Properties

PropertyTypeDescription
static Attribution { get; set; }boolWrites a small "by zplCore.com" in the lower right corner of every label – images, PDF, SVG and generated ZPL – also with a valid licence (for public services such as the zplcore.com website, so they cannot be used as a free render endpoint). Process-wide, off by default; a licence key with the attribution feature switches it on regardless.
static AttributionRequired { get; }boolOutputs created now carry "by zplCore.com" (ZplCoreLicense.Attribution or a licence key with the attribution feature).
static BuildDate { get; }DateOnlyBuild day of this zplCore version: a perpetual key covers versions built up to its end of maintenance.
static Status { get; }ZplLicenseStatusLicence status of the SDK.

Fields & Constants

FieldTypeDescription
const AttributionText = "by zplCore.com"stringText of the attribution (ZplCoreLicense.Attribution).
const EnvironmentVariable = "ZPLCORE_LICENSE"stringEnvironment variable with the licence key.
const FileEnvironmentVariable = "ZPLCORE_LICENSE_FILE"stringEnvironment variable with the path of a file that contains the licence key.
const FileName = "zplcore.license"stringFile name looked for next to the application (AppContext.BaseDirectory).
const WatermarkText = "zplCore.com TRIAL"stringThe watermark text of the evaluation mode.

Methods

Method SignatureReturnsDescription
static # AttributionHeight(int widthDots, int heightDots)intDots the attribution takes at the bottom of a label of this size (text and margins) – for applications that keep a free strip for it, e.g. below a barcode, so it never covers content.
static # GetStatus(ZplLicenseProduct product)ZplLicenseStatusLicence status of a product (the Designer additionally needs an SDK licence of the same or a higher type).
static # Inspect(string key)ZplLicenseInfoVerifies a licence key and returns its contents without registering it.
static # MarkZpl(string zpl)stringAdds what generated ZPL must carry now – the evaluation watermark and/or the attribution – before every ^XZ of ZPL an application writes by hand (the label model, data binding and converters do this themselves). Returns the ZPL unchanged when nothing is required.
static # Register(string key)ZplLicenseStatusRegisters a licence key (replaces a key found earlier). Throws ZplLicenseException when the key cannot be read or its signature is wrong; an expired key or one that does not cover this version is registered and reported in the returned status (evaluation mode with watermark). Returns The status of the SDK with this key.
static # RegisterFile(string path)ZplLicenseStatusReads the licence key from a file and registers it (see ZplCoreLicense.Register).