Aspose::BarCode::Generation::BarcodeGenerator class

BarcodeGenerator class

BarcodeGenerator for backend barcode images generation.

class BarcodeGenerator : public System::IDisposable

Methods

MethodDescription
BarcodeGenerator(System::SharedPtr<BaseEncodeType>)Creates an instance of BarcodeGenerator.
BarcodeGenerator(System::SharedPtr<BaseEncodeType>, System::String)Creates an instance of BarcodeGenerator.
Dispose() overrideClean up any resources being used.
ExportToXml(System::String)Exports BarCode properties to the xml-file specified.
ExportToXml(System::SharedPtr<System::IO::Stream>)Exports BarCode properties to the xml-stream specified.
GenerateBarCodeImage()Generate the barcode image under current settings.
get_BarcodeType()Barcode symbology type.
get_CodeText()Text to be encoded.
get_Parameters()Generation parameters.
static ImportFromXml(System::String)Imports BarCode properties from the xml-file specified and creates BarcodeGenerator instance.
static ImportFromXml(System::SharedPtr<System::IO::Stream>)Imports BarCode properties from the xml-stream specified and creates BarcodeGenerator instance.
Save(System::SharedPtr<System::IO::Stream>, BarCodeImageFormat)Save barcode image to stream in specific format.
Save(System::String, BarCodeImageFormat)Save barcode image to specific file in specific format.
Save(System::String)Save barcode image to specific file.
set_BarcodeType(System::SharedPtr<BaseEncodeType>)Barcode symbology type.
set_CodeText(System::String)Text to be encoded.
SetCodeText(System::ArrayPtr<uint8_t>)Set codetext as sequence of bytes.
SetCodeText(System::String, System::SharedPtr<System::Text::Encoding>)Encodes codetext with byte order mark (BOM) using specified encoding.

Remarks

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 …

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