zplCore.comzplCore.com

ZplPrinterTwin

public static class ZplPrinterTwin

Printer twin: answers "will this label print correctly on this printer model?" with a PrinterProfile. ZplPrinterTwin.Check reports clipping against the printhead width (from the rendered field geometry), label length, firmware feature gates, hardware options, resident fonts and encodings, memory for downloaded objects, print speed and darkness. ZplPrinterTwin.Render renders as that printer prints and ZplPrinterTwin.Estimate estimates the print time.
The checks are only as good as the profile: facts marked unknown are reported as ZplTwinDiagnosticCodes.UnknownFact hints instead of being guessed. Rules and sources: docs-internal/printer-twin.md. Model names are used to identify the hardware described; zplCore is not endorsed, sponsored or certified by the printer vendor.

Methods

Method SignatureReturnsDescription
static # Check(string zpl, PrinterProfile profile, ZplTwinOptions? options = default)ZplTwinReportChecks zpl against profile.
static # Estimate(string zpl, PrinterProfile profile, ZplPrintEstimateOptions? options = default)ZplPrintEstimateEstimates how long zpl takes on profile: transfer over the link (pipelined with printing: a format prints once it has arrived), label length (rendered height plus gap) at the ^PR print speed limited to the model maximum ([Z] p.327), cuts and pauses from the cut plan, optional backfeed and cut times.
static # Render(string zpl, PrinterProfile profile, ZplRenderSettings? settings = default, ZplTwinOptions? options = default)ZplTwinRenderRenders zpl as profile prints it: the profile's dpi, label width = printhead width (a wider ^PW is limited to it), output cropped at the printhead edge, cutter as installed. Missing fonts are drawn with zplCore's fallback (font 0 for an unknown letter, font A for a missing ^A@ file, like ZplDiagnosticCodes.FontNotFound); ZplTwinRender.Report says which. The caller disposes the bitmaps.
static # RenderAnnotated(string zpl, PrinterProfile profile, ZplTwinOptions? options = default)List<byte[]>PNG previews with the twin findings drawn in: the area beyond the printhead hatched red, clipped fields framed (red = error, orange = warning) and tagged with their code, and a header line with profile and counts.