ConsoleRenderOptions Class

Options for rendering a QR code, a two-dimensional barcode or a linear barcode as text, with Unicode block characters.

public sealed class ConsoleRenderOptions

Constructors

NameDescription
ConsoleRenderOptions()

ConsoleRenderOptions()

ConsoleRenderOptions.cs
public ConsoleRenderOptions()

No documentation is available.

Properties

NameDescription
BarHeightGets or sets the height of the bars of a linear barcode that is not stacked, in lines of text. Default is 4.
InvertColorsGets or sets whether to invert colors (light-on-dark), for terminals with a dark background. Default is false.
ModuleHeightGets or sets the vertical size of each rendered module, in half text cells. Default is 1.
ModuleWidthGets or sets the horizontal size of each rendered module in text cells. Default is 1.
QuietZoneModulesGets or sets the number of quiet zone modules. Default is null: 2 around QR codes and two-dimensional barcodes, 10 on the left and right sides of linear barcodes.
ShowTextGets or sets whether the human-readable text (Barcode.Text) is written under a linear barcode. Default is false.

Gets or sets the height of the bars of a linear barcode that is not stacked, in lines of text. Default is 4.

public int BarHeight { get; set; }

Property value

int

Gets or sets whether to invert colors (light-on-dark), for terminals with a dark background. Default is false.

public bool InvertColors { get; set; }

Property value

bool

Gets or sets the vertical size of each rendered module, in half text cells. Default is 1.

public int ModuleHeight { get; set; }

Property value

int

Remarks

A line of text holds two rows of modules. Linear barcodes that are not stacked use ConsoleRenderOptions.BarHeight instead.

Gets or sets the horizontal size of each rendered module in text cells. Default is 1.

public int ModuleWidth { get; set; }

Property value

int

QuietZoneModules

ConsoleRenderOptions.cs

Gets or sets the number of quiet zone modules. Default is null: 2 around QR codes and two-dimensional barcodes, 10 on the left and right sides of linear barcodes.

public int? QuietZoneModules { get; set; }

Property value

int?

Gets or sets whether the human-readable text (Barcode.Text) is written under a linear barcode. Default is false.

public bool ShowText { get; set; }

Property value

bool

Remarks

The text is centered under the bars, on its own line, in the font of the terminal. Its control characters (such as the new lines and escape characters a Code 128 barcode can encode) are written as ?, so the text cannot break the layout or send commands to the terminal.