zplCore.comzplCore.com

PrintJobTemplate

public sealed class PrintJobTemplate

A complete print job as JSON template: optional leading label, the record label and an optional trailing label, plus job options. Load it from one JSON file or from three separate label templates; it always produces ONE job (one ZPL stream / file).

Constructors

SignatureDescription
# PrintJobTemplate()

Properties

PropertyTypeDescription
CopiesField { get; set; }stringRecord member holding the number of copies per record (property path), e.g. "Parcels".
CutAfterLastLabel { get; set; }boolCut only after the last label (tear-off mode before).
JobName { get; set; }string
KeyField { get; set; }stringRecord member used as key for PrintJobInfo.FirstKey/PrintJobInfo.LastKey (property path).
Label { get; set; }LabelThe label printed for every record.
Leading { get; set; }LabelPrinted first; bound to PrintJobInfo.
StoredFormatName { get; set; }stringStore the record label once in printer memory (^DF/^XF) and send only field values.
Trailing { get; set; }LabelPrinted last; bound to PrintJobInfo (counts, first/last key).

Methods

Method SignatureReturnsDescription
# For<T>()LabelBinding<T>Creates the configured data binding for records of type T.
static # FromFiles(string leadingFile, string labelFile, string trailingFile)PrintJobTemplateLoads three label template files into one job (pass null for missing leading/trailing files).
static # FromJson(string json)PrintJobTemplate
static # FromLabels(string labelJson, string? leadingJson = default, string? trailingJson = default)PrintJobTemplateBuilds a job from three separate label templates (leading and trailing are optional).
# SaveFiles(string leadingFile, string labelFile, string trailingFile)voidWrites the three labels as separate template files (leading/trailing only if present).
# ToJson()stringWhole job (all three labels + options) as one JSON document.