Skip to main content
All docs
V25.1
  • QRCodeEPCGenerator Class

    Generates an EPC QR Code barcode.

    Namespace: DevExpress.XtraPrinting.BarCode

    Assembly: DevExpress.Printing.v25.1.Core.dll

    NuGet Package: DevExpress.Printing.Core

    #Declaration

    public class QRCodeEPCGenerator :
        QRCodeGenerator

    #Remarks

    Refer to the following topic for details on this type of barcode: EPC QR Code.

    The following code creates an EPC QR Code barcode and specifies its properties:

    View Example: How to Add a Bar Code to a Report

    using System;
    using System.Collections.Generic;
    using System.Drawing.Printing;
    using System.Windows.Forms;
    using DevExpress.XtraPrinting.BarCode;
    using DevExpress.XtraPrinting.BarCode.EPC;
    using DevExpress.XtraReports.UI;
    // ...
    public XRBarCode CreateQRCodeEPCBarCode() {
        // Create a barcode control.
        XRBarCode barCode = new XRBarCode();
    
        // Set the barcode's type to QRCode.
        barCode.Symbology = new QRCodeEPCGenerator();
    
        // Adjust the barcode's main properties.
        barCode.Width = 400;
        barCode.Height = 400;
    
        var epcData = new EPCDataConverter() 
        {
            BIC = "BPOTBEB1",
            BeneficiaryName = "Red Cross of Belgium",
            IBAN = "BE72000000001616",
            TransferAmount = 20,
            PaymentReference = "Empty line or REFINVOICE"
        };
    
        barCode.Text = epcData.StringData;
    
        // If the AutoModule property is set to false, uncomment the next line.
        barCode.AutoModule = true;
        // barcode.Module = 3;
    
        // Set a frame that meets the Payment Services Austria standard.
        ((QRCodeGenerator)barCode.Symbology).FrameOptions = new PaymentServicesAustriaQRFrameOptions();
    
        return barCode;
    }
    

    #Inheritance

    Object
    DevExpress.Printing.Utils.DocumentStoring.StorableObjectBase
    See Also