BarcodeGenerator

BarcodeGenerator class

BarcodeGenerator for backend barcode images generation.

supported symbologies: 1D: Codabar, Code11, Code128, Code39Standard, Code39Extended Code93Standard, Code93Extended, EAN13, EAN8, Interleaved2of5, MSI, Standard2of5, UPCA, UPCE, ISBN, GS1Code128, Postnet, Planet EAN14, SCC14, SSCC18, ITF14, SingaporePost … 2D: Aztec, DataMatrix, PDf417, QR code …

public sealed class BarcodeGenerator : Component

Constructors

Name Description
BarcodeGenerator(BaseEncodeType) Creates an instance of BarcodeGenerator.
BarcodeGenerator(BaseEncodeType, string) Creates an instance of BarcodeGenerator.

Properties

Name Description
BarcodeType { get; set; } Barcode symbology type.
CodeText { get; set; } Text to be encoded.
Parameters { get; } Generation parameters.

Methods

Name Description
static ImportFromXml(Stream) Imports BarCode properties from the xml-stream specified and creates BarcodeGenerator instance.
static ImportFromXml(string) Imports BarCode properties from the xml-file specified and creates BarcodeGenerator instance.
DrawWpf(DrawingContext) Draws barcode image on WPF canvas.
ExportToXml(Stream) Exports BarCode properties to the xml-stream specified
ExportToXml(string) Exports BarCode properties to the xml-file specified
GenerateBarCodeImage() Generate the barcode image under current settings.
Save(string) Save barcode image to specific file.
Save(Stream, BarCodeImageFormat) Save barcode image to stream in specific format.
Save(string, BarCodeImageFormat) Save barcode image to specific file in specific format.

Examples

This sample shows how to create and save a barcode image.

[C#]
  using(var generator = new BarcodeGenerator(EncodeTypes.Code128))
  {
      generator.CodeText = "123ABC";
      generator.Save("code128.png");
  }

See Also