Saturday, September 1, 2018

Using QRCoder

Download QRCoder from Git hub

Include the dll reference "QRCoder" and in your class specify the using directive as :

using QRCoder;


The simple code to generate the qr code is as shown in the below code snippet. Here payload is a string. The payload string was constructed from a StringBuilder.


QRCodeGenerator qrGenerator = new QRCodeGenerator();
QRCodeData qrCodeData = qrGenerator.CreateQrCode(payLoad, QRCodeGenerator.ECCLevel.Q);
QRCode qrCode = new QRCode(qrCodeData);
Bitmap qrCodeImage = qrCode.GetGraphic(20);


No comments:

Post a Comment