zplCore.comzplCore.com

BarcodeItem

public sealed class BarcodeItem : LabelItem

Constructors

SignatureDescription
# BarcodeItem()

Properties

PropertyTypeDescription
AddChecksum { get; set; }bool
BackColor { get; set; }stringBackground colour as hex (#RRGGBB); a dark background prints the code inverted.
BarArt { get; set; }BarArtMotif in the upper part of the bars of a linear code (printed as ^GFA). Default none.
BarArtHeightPercent { get; set; }doublePart of the bar height the motif may use, 5–40 % (default 30); the rest stays plain bars.
BarArtImageData { get; set; }byte[]Silhouette for BarArt.Image (PNG, JPEG … or SVG bytes; base64 in JSON): dark, opaque pixels keep the bar.
BarHeight { get; set; }doubleBar height in label units (1D) or module size in dots (QR/DataMatrix/Aztec).
BearerBarWidth { get; set; }doubleBearer bar thickness in dots.
BearerBars { get; set; }BearerBarStyle
Code { get; set; }string
Code128Mode { get; set; }Code128ModeCode 128 mode (^BC m, native only; Symbology.Gs1_128 always uses mode D).
CodeEncoding { get; set; }CodeEncodingHow BarcodeItem.Code is interpreted (text, base64, hex).
DataBarSegments { get; set; }int?GS1 DataBar Expanded (Stacked) segments per row, even, 2–22 (null = 22 for Expanded, 4 for Expanded Stacked).
FinderShape { get; set; }FinderShape
FitSample { get; set; }stringValue used to choose the fitted module width instead of each label's own data, e.g. the longest value a bound field will get – so every label of a job gets the same module width (required for stored formats). Null = the label's data.
ForeColor { get; set; }stringBar colour as hex (#RRGGBB); dark colours print black, light ones white.
GuardBars { get; set; }boolExtend EAN/UPC guard bars into the text.
HalftoneImageData { get; set; }byte[]Halftone QR (PNG, JPEG … or SVG bytes; base64 in JSON): the image is worked into the modules – each module is split into 3 × 3 sub-modules, the centre and all function patterns keep the data, the others are dithered from the image. QR Code / GS1 QR Code only, error correction H, printed as ^GFA (module at least 3 dots). Null = off. Only applied while Barcode.HalftoneEnabled is true; otherwise the code prints as a plain QR Code.
HalftoneStrength { get; set; }doubleShare of the outer sub-modules following the halftone image, 0–1 (default 0.6). Weakened automatically when the code would not read (BarcodeItem.VerifyReadability).
Height { get; set; }double?Box height in label units. When set, a native 1D barcode gets the bar height that leaves room for its printed interpretation line inside the box (overrides BarcodeItem.BarHeight); 2D symbols fit Width × Height.
HideIfEmpty { get; set; }boolEmit nothing when the resolved data (bound field, expression or code) is empty or white space, like TextItem.HideIfEmpty: an empty field would still print a symbol (UPC-A, for example, as 000000000000). In a stored format such an item goes with each record's ^XF, so it prints as the plain format does.
HumanReadable { get; set; }boolPrint the human-readable interpretation line (^BC/^B3 ... f parameter).
HumanReadableAbove { get; set; }boolPrint the human-readable line above the bars instead of below (^BC/^B3 ... g parameter).
HumanReadableGap { get; set; }double?Gap between the compact interpretation line (BarcodeItem.HumanReadableHeight) and the bars in label units (null = 4/9 of the line height). No effect without BarcodeItem.HumanReadableHeight.
HumanReadableHeight { get; set; }double?Height of a compact interpretation line in label units (null = the printer's own line, whose font grows with the module width). When set, a native 1D barcode is printed without the printer's line and the text is set below (or above, BarcodeItem.HumanReadableAbove) in font 0 of this height – EAN-13/EAN-8/UPC-A in their digit groups under the bar halves, other symbologies centred. Output stays native.
HumanReadableText { get; set; }stringText instead of the encoded data.
IsGeneratorOnly { get; }boolSymbologies without a ZPL barcode command.
LightMarginIndicator { get; set; }boolEAN/UPC light margin indicators ('<' '>').
LogoBackground { get; set; }boolWhite plate (one module wider than the logo) behind the logo (default true). False: the generator (^GFA) draws the logo directly over the modules.
LogoImageData { get; set; }byte[]Logo in the middle of a native QR code (PNG, JPEG, … or SVG bytes; base64 in JSON). The code stays a native ^BQ, printed with error correction H; a white ^GB box (whole modules, one module of margin) is placed over it and the logo as a small ^GFA graphic inside. Only for Symbology.QrCode; null = no logo.
LogoOpacity { get; set; }doubleLogo opacity 0–1 (default 1). Below 1 the code is drawn by the generator (^GFA) with the logo blended in.
LogoPosition { get; set; }LogoPositionWhere the logo box sits: centred, or in the upper/lower part between the finder patterns.
LogoSizePercent { get; set; }doubleWidth of the logo box in % of the QR symbol (5–30, default 20; larger logos would hide too many modules).
MaxiCodeMode { get; set; }intMaxiCode mode 2–6 (^BD).
ModuleShape { get; set; }ModuleShape
ModuleWidth { get; set; }intNarrow bar / module width in dots (^BY w).
Options { get; set; }BarcodeItemOptionsFurther generator render/symbology options (sizing, border, padding, Data Matrix size, Aztec layers …); any value set renders the item through the generator (^GFA).
Pdf417Columns { get; set; }intPDF417 data columns 1–30 (0 = automatic, ^B7 c).
Pdf417RowHeight { get; set; }intPDF417 row height in dots (^B7 h; 0 = 3 × BarcodeItem.ModuleWidth).
Pdf417Rows { get; set; }intPDF417 rows 3–90 (0 = automatic, ^B7 r; native only).
Pdf417SecurityLevel { get; set; }intPDF417 security level 0–8 (^B7 s).
Pdf417Truncated { get; set; }boolTruncated PDF417 without the right row indicators and stop pattern (^B7 t = Y; native).
ProcessTilde { get; set; }boolTilde escapes (~1 FNC1, ~dNNN …) in BarcodeItem.Code.
QrErrorCorrection { get; set; }charQR error correction: L, M, Q, H.
QrMask { get; set; }intQR mask 0–7 (-1 = automatic).
QrVersion { get; set; }intQR version 1–40 (0 = automatic).
QuietZone { get; set; }int?Quiet zone in modules on every side (null = none on labels).
Rotation { get; set; }ItemRotation
Supplement { get; set; }stringEAN/UPC 2/5-digit add-on.
Symbology { get; set; }Symbology
TextAlignment { get; set; }HumanReadableAlignment
TextFontSize { get; set; }doubleHuman readable font size in points (0 = automatic).
TextFormatPattern { get; set; }stringFormat/mask of the human readable text, e.g. "{0:### ###}" or "AAA-999".
UpcENumberSystem { get; set; }int?UPC-E number system 0 or 1 (null = as in the data): replaces the first digit of 7- or 8-digit data and is put in front of 6-digit data, before the code is printed (^B9 takes number system + 6 digits).
ValidationErrorMessage { get; set; }stringMessage reported by Label.Validate instead of the built-in ones when the readability check of this code fails; {name} and {value} are replaced.
VerifyReadability { get; set; }boolDecode artistic codes (shapes, logo, halftone, bar motif) after rendering at the print resolution; a halftone image or bar motif that does not read is weakened, and Label.Validate reports what does not read. Cached per content and settings. Default true.
WideRatio { get; set; }doubleWide-to-narrow ratio for Code 39, I2of5, Codabar ... (2.0–3.0).
Width { get; set; }double?Box width in label units, measured along the label as drawn (for a 90°/270° barcode the bars run across it). When set, a native barcode gets the largest whole module width (dots, at the print resolution) whose bars fit the box; 2D symbols the largest module size that fits BarcodeItem.Width × BarcodeItem.Height. Overrides BarcodeItem.ModuleWidth (and the module size in BarcodeItem.BarHeight); the output stays native (^BY + barcode command, no ^GFA). Null = BarcodeItem.ModuleWidth as set.

Methods

Method SignatureReturnsDescription
static # ToGenerator(Symbology s)SymbologyGenerator symbology of a label symbology.
# ToZpl(ZplContext ctx)string