VIDEOS

How to Generate a QR Code Using C# with IronBarcode

Jordi Bardia
Jordi Bardia
July 19, 2022
Share:


This tutorial provides a comprehensive guide on generating QR codes using C# with the Iron Barcode library, which is free for development purposes. It begins by installing the Iron Barcode package via the Package Manager Console using the command 'install-package barcode'. Once installed, you navigate to the 'Program.cs' file and include the 'using IronBarcode' namespace. By employing the 'QRCodeWriter.CreateQrCode' function, you can convert your desired text into a QR code. The tutorial demonstrates saving QR codes in various formats, such as PNG, JPEG, and PDF. To adjust the QR code size, simply provide your preferred dimensions as a second argument in the 'CreateQrCode' function. You can also enhance your QR code with text annotations using functions like 'AddBarcodeValueTextBelowBarcode' and 'AddAnnotationTextAboveBarcode'. Additionally, the tutorial covers incorporating logos into your QR codes by replacing the 'CreateQrCode' function with 'CreateQrCodeWithLogo', passing the QR code value, logo file path, and size as arguments. After executing these steps, the tutorial concludes with viewing the generated QR code, now complete with annotations and a logo. This step-by-step guide ensures users can efficiently create and customize QR codes for their specific needs.

Further Reading: How to Generate a QR Code Using C# with IronBarcode

Get stated with IronQR now.
green arrow pointer

Jordi Bardia
Software Engineer
Jordi is most proficient in Python, C# and C++, when he isn’t leveraging his skills at Iron Software; he’s game programming. Sharing responsibilities for product testing, product development and research, Jordi adds immense value to continual product improvement. The varied experience keeps him challenged and engaged, and he says it’s one of his favorite aspects of working with Iron Software. Jordi grew up in Miami, Florida and studied Computer Science and Statistics at University of Florida.
< PREVIOUS
How to Print a Barcode in ASP .NET
NEXT >
How to Create Barcodes in ASP .NET with IronBarcode

Ready to get started? Version: 2025.4 just released

View Licenses >