API Reference
Class
MatrixBarcode
Simple helpers for matrix and stacked barcode symbologies.
Inheritance
- Object
- MatrixBarcode
Remarks
Use RenderExtras) to pick the output format by file extension.
Examples
using CodeGlyphX;
MatrixBarcode.Save(BarcodeType.DataMatrix, "ORDER-12345", "datamatrix.png");
MatrixBarcode.Save(BarcodeType.PDF417, "DOCUMENT-12345", "pdf417.svg");
Methods
public static BitMatrix Encode(BarcodeType type, String content) #Returns:
BitMatrixEncodes a matrix or stacked barcode.
Parameters
- type CodeGlyphX.BarcodeType
- content System.String
Render 2 overloads
public static RenderedOutput Render(BarcodeType type, String content, OutputFormat format, MatrixOptions options = null, RenderExtras extras = null) #Returns:
RenderedOutputRenders a matrix or stacked barcode to the requested output format.
Parameters
- type CodeGlyphX.BarcodeType
- content System.String
- format CodeGlyphX.Rendering.OutputFormat
- options CodeGlyphX.MatrixOptions = null
- extras CodeGlyphX.Rendering.RenderExtras = null
public static RenderedOutput Render(BitMatrix modules, OutputFormat format, MatrixOptions options = null, RenderExtras extras = null) #Returns:
RenderedOutputRenders a matrix or stacked barcode to the requested output format.
Parameters
- modules CodeGlyphX.BitMatrix
- format CodeGlyphX.Rendering.OutputFormat
- options CodeGlyphX.MatrixOptions = null
- extras CodeGlyphX.Rendering.RenderExtras = null
Save 2 overloads
public static String Save(BarcodeType type, String content, String path, MatrixOptions options = null, RenderExtras extras = null) #Returns:
StringSaves a matrix or stacked barcode to a file based on the file extension. Defaults to PNG when no extension is provided.
Parameters
- type CodeGlyphX.BarcodeType
- content System.String
- path System.String
- options CodeGlyphX.MatrixOptions = null
- extras CodeGlyphX.Rendering.RenderExtras = null
public static Void Save(BarcodeType type, String content, Stream stream, OutputFormat format, MatrixOptions options = null, RenderExtras extras = null) #Returns:
VoidSaves a matrix or stacked barcode to a stream using the requested output format.
Parameters
- type CodeGlyphX.BarcodeType
- content System.String
- stream System.IO.Stream
- format CodeGlyphX.Rendering.OutputFormat
- options CodeGlyphX.MatrixOptions = null
- extras CodeGlyphX.Rendering.RenderExtras = null