zplCore.comzplCore.com
class8 members

ZplCutPlan

public sealed class ZplCutPlan

Where a Zebra printer with cutter cuts the labels of one render call (ZplRenderer.LastCutPlan): one ZplLabelCut per printed label plus diagnostics. Rules (ZPL II Programming Guide ^MM, ^PQ, ^XB, ^CN, ^KV, ^JU, ~JK) are described in docs-internal/chaos-printer.md.

Properties

PropertyTypeDescription
CutAfter { get; }IReadOnlyList<int>Indexes of the labels after which the printer cuts.
CutCount { get; }intNumber of cuts.
CutsPreviousJob { get; }boolA ~JK in this job cut the label that the previous job (an earlier render call) left waiting in ^MMD.
Diagnostics { get; }IReadOnlyList<ZplDiagnostic>Hints such as ^MMD without ~JK or cutter mode without cutter (codes in ZplCutDiagnosticCodes).
static Empty { get; }ZplCutPlanAn empty plan (no labels).
Labels { get; }IReadOnlyList<ZplLabelCut>One entry per printed label, in print order.

Methods

Method SignatureReturnsDescription
static # Analyze(string zpl, ZplRenderSettings? settings = default)ZplCutPlanRenders zpl with a fresh renderer and returns its cut plan (the bitmaps are discarded). Pass the settings of the target printer (dpi, label size, ZplRenderSettings.CutterInstalled, ZplRenderSettings.MaxQuantity).
# ToJson(bool indented = false)stringThe plan as JSON: {"labels":[{"index":0,"copy":0,"mode":"Cutter","cut":true,"reason":"EveryLabel", "pauseAfter":false,"partialCutMm":0}],"cutAfter":[0],"cutsPreviousJob":false,"diagnostics":[{"code","severity","message","command"}]}.