zplCore.comzplCore.com

LabelSheet

public sealed class LabelSheet

Sheet of labels (e.g. A4 office label sheets or wide multi-across media). Each label is rendered through the ZPL renderer and placed on the page as a raster image (LabelSheet.ToPdf, LabelSheet.ToPng), or sent to a wide-media label printer side by side (LabelSheet.ToZpl`). Sizes are in LabelSheet.Unit; the label size comes from the LabelSheet.Label.

Constructors

SignatureDescription
# LabelSheet()

Properties

PropertyTypeDescription
Columns { get; set; }int
HorizontalGap { get; set; }double
Label { get; set; }LabelOptional label stored with the sheet (used by the overloads without a label argument).
LabelsPerSheet { get; }int
MarginLeft { get; set; }double
MarginTop { get; set; }double
Order { get; set; }LabelSheetOrder
PageHeight { get; set; }double
PageWidth { get; set; }double
Rows { get; set; }int
StartPosition { get; set; }int1-based position of the first label on the first sheet (reuse partially used sheets).
Unit { get; set; }LabelUnit
VerticalGap { get; set; }double

Methods

Method SignatureReturnsDescription
# CellPosition(int slot, Label label)(double, double)Top-left of the cell slot (0-based, on one sheet) in sheet units.
static # FromJson(string json)LabelSheet
# ToJson()string
# ToPdf(int dpi = 203, int count = 0)byte[]
# ToPdf<T>(Label label, IEnumerable<T> records, int dpi = 203)byte[]All sheets as one PDF (raster labels placed on page-sized pages).
# ToPdf(Label label, int dpi = 203, int count = 0)byte[]
# ToPng(int dpi = 203, int count = 0)List<byte[]>
# ToPng<T>(Label label, IEnumerable<T> records, int dpi = 203)List<byte[]>Sheets as PNG pages for the label's records.
# ToPng(Label label, int dpi = 203, int count = 0)List<byte[]>Sheets as PNG pages; count unbound labels (0 = fill the first sheet), counters advance.
# ToZpl<T>(Label label, IEnumerable<T> records, int dpi = 203)stringZPL for wide (multi-across) media: LabelSheet.Columns labels side by side per format, using LabelBinding.Across with LabelSheet.HorizontalGap and LabelSheet.MarginLeft. Requires row-wise order and LabelSheet.StartPosition 1 (a label printer can't skip used positions).
# ToZpl(Label label, int dpi = 203, int count = 0)stringWide media ZPL for unbound labels: one row of LabelSheet.Columns labels per format.