zplCore.comzplCore.com

ZplOutputOptions

public sealed class ZplOutputOptions

How ZplDocument.ToZpl writes ZPL. Every layout keeps the command stream: the output parses to the same commands (generated ^FX comments aside) and renders pixel-identically. Field data (^FD/^FV) and graphic payloads are written exactly as parsed, and no whitespace is ever inserted after field data.

Constructors

SignatureDescription
# ZplOutputOptions()

Properties

PropertyTypeDescription
AddComments { get; set; }boolPretty-print only: inserts a ^FX comment describing each field (text, barcode, box … and its position).
FieldsOnOneLine { get; set; }boolPretty-print only: a whole field block on one line (^FO50,50^A0N,30,30^FDHi^FS) instead of one command per line.
Indent { get; set; }intSpaces per indentation level when pretty-printing (0–8, default 2).
static Minified { get; }ZplOutputOptionsSmallest output: no whitespace between commands and no ^FX comments.
Minify { get; set; }boolNo whitespace between commands (one label per line). Wins over ZplOutputOptions.PrettyPrint.
NewLine { get; set; }stringLine break written between lines (default "\n").
static Pretty { get; }ZplOutputOptionsOne command per line with indented field blocks.
PrettyPrint { get; set; }boolOne command per line, label contents and field blocks (^FO/^FT … ^FS) indented.
StripComments { get; set; }boolRemoves existing ^FX comments (printers ignore them).