Barcode2DConsoleRenderer Class
Provides methods to render a two-dimensional barcode (Data Matrix, PDF417, Aztec) using Unicode block characters.
public static class Barcode2DConsoleRendererMethods
| Name | Description |
|---|---|
| ToConsoleString(Barcode2D, ConsoleRenderOptions?) | Renders the barcode as a string using Unicode block characters, two rows of modules per line. |
| WriteTo(Barcode2D, TextWriter, ConsoleRenderOptions?) | Renders the barcode to a TextWriter using Unicode block characters. |
| WriteToConsole(Barcode2D, ConsoleRenderOptions?) | Renders the barcode to Console.Out. |
ToConsoleString(Barcode2D, ConsoleRenderOptions?)
Barcode2DConsoleRenderer.csRenders the barcode as a string using Unicode block characters, two rows of modules per line.
public static string ToConsoleString(this Barcode2D barcode, ConsoleRenderOptions? options = null)Parameters
barcodeBarcode2D- The barcode to render.
optionsConsoleRenderOptions?- The rendering options, or
nullfor the defaults.
Returns
string The lines of the barcode, without trailing spaces and without a final new line.
Exceptions
ArgumentNullExceptionbarcodeisnull.ArgumentOutOfRangeException- An option is out of range, or the text is too large for a string.
WriteTo(Barcode2D, TextWriter, ConsoleRenderOptions?)
Barcode2DConsoleRenderer.csRenders the barcode to a TextWriter using Unicode block characters.
public static void WriteTo(this Barcode2D barcode, TextWriter writer, ConsoleRenderOptions? options = null)Parameters
barcodeBarcode2D- The barcode to render.
writerTextWriter- The destination.
optionsConsoleRenderOptions?- The rendering options, or
nullfor the defaults.
Exceptions
ArgumentNullExceptionbarcodeorwriterisnull.ArgumentOutOfRangeException- An option is out of range, or the text is too large for a string.
WriteToConsole(Barcode2D, ConsoleRenderOptions?)
Barcode2DConsoleRenderer.csRenders the barcode to Console.Out.
public static void WriteToConsole(this Barcode2D barcode, ConsoleRenderOptions? options = null)Parameters
barcodeBarcode2D- The barcode to render.
optionsConsoleRenderOptions?- The rendering options, or
nullfor the defaults.
Exceptions
ArgumentNullExceptionbarcodeisnull.ArgumentOutOfRangeException- An option is out of range, or the text is too large for a string.