EPCDataConverter Class
Converts data elements into the format required for EPC QR Codes.
Namespace: DevExpress.XtraPrinting.BarCode.EPC
Assembly: DevExpress.Printing.v24.1.Core.dll
NuGet Package: DevExpress.Printing.Core
Declaration
Remarks
EPC QR Codes allow users to initiate a SEPA credit transfer (SCT).The following guideline contains general information about this type of barcodes and defines the data format for EPC QR Codes: Quick Response Code - Guidelines to Enable the Data Capture for the Initiation of a SEPA Credit Transfer.
The line endings that separate data elements depend on the platform: Linux and Mac use LF; Windows uses CRLF.
The following code snippet transforms separate data elements into a string that conforms to the guideline and passes it to the barcode’s Text property:
BCD
001
1
SCT
BPOTBEB1
Red Cross of Belgium
BE72000000001616
EUR20.00
CHAR
Urgency fund
Sample EPC QR code
using DevExpress.XtraPrinting.BarCode;
using DevExpress.XtraPrinting.BarCode.EPC;
using DevExpress.XtraReports.UI;
//...
XRBarCode barCode = new XRBarCode();
barCode.Symbology = new QRCodeEPCGenerator();
//...
var epcData = new EPCDataConverter() {
Version = EPCVersion.Version1,
BIC = "BPOTBEB1",
BeneficiaryName = "Red Cross of Belgium",
IBAN = "BE72000000001616",
TransferAmount = 20,
TransferPurpose = "CHAR",
RemittanceInformation = "Urgency Fund",
Information = "Sample EPC QR code"
};
barCode.Text = epcData.StringData;
The resulting EPC QR Code is shown below:
You can also pass barcode data to the barcode’s BinaryData property. To do this, use the BinaryData property of the EPCDataConverter
object: