zplCore.comzplCore.com

ComplianceLabel

public sealed class ComplianceLabel

One rendered label prepared for compliance rules: size, resolution, elements with measured geometry and the rendered ink, so rules can look at what will actually print.

Properties

PropertyTypeDescription
Barcodes { get; }IEnumerable<ComplianceBarcode>
Bounds { get; }ComplianceRectThe whole label as rectangle.
Commands { get; }IReadOnlyList<ZplCommand>Commands of the label format (^XA … ^XZ) with source offsets.
Dpi { get; }int
Elements { get; }IReadOnlyList<ComplianceElement>Elements in drawing order.
HasLabelLength { get; }boolThe ZPL declares the length (^LL).
HasPrintWidth { get; }boolThe ZPL declares the width (^PW).
Height { get; }intLabel height in dots (^LL or the default size).
HeightMm { get; }double
Index { get; }int0-based index in print order.
RenderDiagnostics { get; }IReadOnlyList<ZplDiagnostic>Render diagnostics of this label (fields that could not be drawn etc.).
Rfid { get; }IReadOnlyList<ZplRfidCommand>RFID commands of the label in format order, with resolved field data (see ZplRfidCommand).
Source { get; }stringThe complete ZPL source that was checked.
Texts { get; }IEnumerable<ComplianceText>
Width { get; }intLabel width in dots (^PW or the default size).
WidthMm { get; }double

Methods

Method SignatureReturnsDescription
# InkBounds(ComplianceRect r)ComplianceRectTight bounds of the ink inside r (empty when there is none).
# InkCount(ComplianceRect r)intNumber of inked dots inside r (the part on the label).
# IsInk(int x, int y)boolInk at a dot (false outside the label).
# LastCommand(string name)stringCommand arguments of the last ^name in the format (e.g. "MD"), or null.
# ToDots(double mm)int
# ToMm(double dots)double