zplCore.comzplCore.com
record12 members

ZplLimits

public record ZplLimits

Hard engine limits for untrusted input that apply to every renderer created or used inside a scope opened with ZplLimits.Enforce, including the renderers that higher-level features create internally (compliance check, scan-proof, label import, extraction/redaction, GS1 migration, printer twin, cut plan, Vector-Lift). Settings and printer stores are clamped to the stricter of their own value and the limit, so a feature cannot loosen them.

The scope flows with the async/execution context (AsyncLocal), so it covers tasks and Parallel loops started inside it. Scopes nest: the effective limits are the strictest of all open scopes. Without a scope nothing changes. Used by the MCP server's worker for every tool call.

Constructors

SignatureDescription
# ZplLimits()

Properties

PropertyTypeDescription
static Current { get; }ZplLimitsThe limits in force on this execution context, or null when no scope is open.
FixedClock { get; init; }DateTime?Clock for ^FC fields and timestamps instead of the host clock (null: keep the renderer's clock).
Isolated { get; init; }boolTrue: no ZplRenderSettings.FontProvider, no system fonts (ZplRenderSettings.UseSystemFonts), no background/watermark image and no decoded-graphic cache. Fonts can then only be downloaded in the same input.
MaxFieldDataLength { get; init; }intLongest field data (ZplRenderSettings.MaxFieldDataLength).
MaxGraphicBytes { get; init; }intLargest decoded graphic (ZplRenderSettings.MaxGraphicBytes).
MaxLabelDots { get; init; }longDots per label (ZplRenderSettings.MaxLabelDots).
MaxLabelSide { get; init; }intLongest label side (ZplRenderSettings.MaxLabelSide).
MaxLabels { get; init; }intLabels per render call (ZplRenderSettings.MaxLabels).
MaxQuantity { get; init; }int^PQ copies (ZplRenderSettings.MaxQuantity).
MaxStoreBytes { get; init; }longPrinter storage per store (ZplResourceStore.MaxTotalBytes; 0 there means unlimited and is clamped too).

Methods

Method SignatureReturnsDescription
static # Enforce(ZplLimits limits)IDisposableOpens a scope; dispose it to restore the previous limits. Nested scopes combine to the strictest values.