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 ConsoleRenderOptionsConstructors
| Name | Description |
|---|---|
| ConsoleRenderOptions() |
ConsoleRenderOptions()
ConsoleRenderOptions.cspublic ConsoleRenderOptions()No documentation is available.
Properties
| Name | Description |
|---|---|
| BarHeight | Gets or sets the height of the bars of a linear barcode that is not stacked, in lines of text. Default is 4. |
| InvertColors | Gets or sets whether to invert colors (light-on-dark), for terminals with a dark background. Default is false. |
| ModuleHeight | Gets or sets the vertical size of each rendered module, in half text cells. Default is 1. |
| ModuleWidth | Gets or sets the horizontal size of each rendered module in text cells. Default is 1. |
| QuietZoneModules | 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. |
| ShowText | Gets or sets whether the human-readable text (Barcode.Text) is written under a linear barcode. Default is false. |
BarHeight
ConsoleRenderOptions.csInvertColors
ConsoleRenderOptions.csModuleHeight
ConsoleRenderOptions.csGets or sets the vertical size of each rendered module, in half text cells. Default is 1.
public int ModuleHeight { get; set; }Property value
Remarks
A line of text holds two rows of modules. Linear barcodes that are not stacked use ConsoleRenderOptions.BarHeight instead.
ModuleWidth
ConsoleRenderOptions.csQuietZoneModules
ConsoleRenderOptions.csShowText
ConsoleRenderOptions.csGets 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
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.