corelibraries-devexpress-dot-xtraprinting-dot-barcode-730012a5.md
Generates an EPC QR Code barcode.
Namespace : DevExpress.XtraPrinting.BarCode
Assembly : DevExpress.Printing.v25.2.Core.dll
NuGet Package : DevExpress.Printing.Core
public class QRCodeEPCGenerator :
QRCodeGenerator
Public Class QRCodeEPCGenerator
Inherits QRCodeGenerator
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;
}
Imports System
Imports System.Collections.Generic
Imports System.Drawing.Printing
Imports System.Windows.Forms
Imports DevExpress.XtraPrinting.BarCode
Imports DevExpress.XtraPrinting.BarCode.EPC
Imports DevExpress.XtraReports.UI
' ...
Public Function CreateQRCodeEPCBarCode() As XRBarCode
' Create a barcode control.
Dim barCode As 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
Dim epcData = New EPCDataConverter() With {
.BIC = "BPOTBEB1",
.BeneficiaryName = "Red Cross of Belgium",
.IBAN = "BE72000000001616",
.TransferAmount = 1,
.RemittanceInformation = "Urgency Fund"
}
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.
CType(barCode.Symbology, QRCodeGenerator).FrameOptions = New PaymentServicesAustriaQRFrameOptions()
Return barCode
End Function
Object DevExpress.Printing.Utils.DocumentStoring.StorableObjectBase BarCodeGeneratorBase BarCode2DGenerator QRCodeGenerator QRCodeEPCGenerator
See Also