XD.EpcQrCodeGenerator 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package XD.EpcQrCodeGenerator --version 1.0.0                
NuGet\Install-Package XD.EpcQrCodeGenerator -Version 1.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="XD.EpcQrCodeGenerator" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add XD.EpcQrCodeGenerator --version 1.0.0                
#r "nuget: XD.EpcQrCodeGenerator, 1.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install XD.EpcQrCodeGenerator as a Cake Addin
#addin nuget:?package=XD.EpcQrCodeGenerator&version=1.0.0

// Install XD.EpcQrCodeGenerator as a Cake Tool
#tool nuget:?package=XD.EpcQrCodeGenerator&version=1.0.0                

EPC QR-Code Generator

This project is a simple, light solution to generate EPC QR-Codes. These are used in order to initiate a SEPA money transfer while pre-filling most input fields, effectively reducing the risk of manual input error while being highly convenient to use.

How to use the library

The repository contains a console app that can be used to experiment with the library or to quickly generate an EPC QR-Code on the fly. You can use it in your own application with these few lines of code :

var epcData = new EpcQrCodeData
{
    //Set your custom values here :
    BeneficiaryName = "WIKIMEDIA FOUNDATION INC",
    BeneficiaryIban = "GB12CITI18500818796270",
    BeneficiaryBic = "CITIGB2L", //Optional
    CreditAmount = 1.00m,

    // You can only use one RemitanceInformation property, leave the other empty.
    RemittanceInformationStructured = "",
    RemittanceInformationUnstructured = "Thank you for your hard work."
};

var epcGenerator = new EpcQrCodeGenerator.EpcQrCodeGenerator(epcData);
epcGenerator.SaveAsSvg(filePath);

Using the SaveAsSvg() method will trigger a validation of the values encoded in the data object. If the values are invalid, and detailed exception will be triggerred.

The SaveAsSvg() method uses an external QR-Code generator to render the actual image. If you want to use your own generator you can get the payload used to generate the QR-Code by using the following method :

string encodedPayload = epcData.GeneratePayload();

Calling epcData.GeneratePayload() will also trigger a validation of the provided data, raising an exception similarly if an error is detected. You can then use the encodedPayload string with your chosen QR-Code generator.

Notes

  • EPC QR-Codes are also sometimes refered to as GiroCodes, the German name. These are the same thing.
  • I don't recommend using this project for professional use, as I provide no support over it. If you are looking for a reliable solution for business use, I recommend you look at QRCoder.
  • This project relies on QrCodeGenerator for QR-Codes generation. However, any QR-Code generator can be used in it's place with the generated payload.

See also

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.1 905 1/13/2023
1.0.0 198 1/13/2023

Initial Release