AztecCodeGenerator Class
Generates an Aztec Code barcode.
Namespace: DevExpress.XtraPrinting.BarCode
Assembly: DevExpress.Printing.v24.2.Core.dll
Declaration
Remarks
Refer to the following topic for details on this type of barcode: Aztec Code.
You can specify the following properties specific to the Aztec Code barcode type:
- AztecCodeGenerator.CompactionMode
- Specifies whether text or binary mode should be used to encode the barcode’s data.
- AztecCodeGenerator.Version
- Specifies the Aztec Code version.
- AztecCodeGenerator.ErrorCorrectionLevel
- Specifies the amount of redundancy built into the bar code to compensate for calculation errors.
The following code snippet generates an Aztec Code barcode and specifies its properties:
using System;
using System.Collections.Generic;
using System.Drawing.Printing;
using System.Windows.Forms;
using DevExpress.XtraPrinting.BarCode;
using DevExpress.XtraReports.UI;
public XRBarCode CreateAztecCode(string BarCodeText) {
// Create a barcode control.
XRBarCode barCode = new XRBarCode();
// Set the barcode's type to Aztec Code.
barCode.Symbology = new AztecCodeGenerator();
// Adjust the barcode's main properties.
barCode.Text = BarCodeText;
barCode.Width = 300;
barCode.Height = 100;
// Adjust the properties specific to the barcode type.
((AztecCodeGenerator)barCode.Symbology).Version = AztecCodeVersion.Version27x27;
((AztecCodeGenerator)barCode.Symbology).ErrorCorrectionLevel = AztecCodeErrorCorrectionLevel.Level1;
((AztecCodeGenerator)barCode.Symbology).CompactionMode = AztecCodeCompactionMode.Text;
return barCode;
}
Inheritance
Object
DevExpress.Printing.Utils.DocumentStoring.StorableObjectBase
BarCodeGeneratorBase
BarCode2DGenerator
AztecCodeGenerator
See Also