VIDEOS

How to Generate Barcode Images in C# for .NET using Iron Barcode

Jordi Bardia
Jordi Bardia
March 1, 2022
Share:


In this tutorial, learn how to generate barcode images using C# and the Iron Barcode library. Begin by opening Visual Studio and accessing the package manager console. Install the barcode library using the command install package barcode. Once installed, navigate to the program.cs file to write your code. Import the namespace using IronBarcode and use BarcodeWriter.CreateBarcode() to generate the barcode, specifying the text to encode. For this example, the text is 'This is my first barcode by Iron Barcode'. Use the encoding scheme BarcodeEncoding.Code128. Save the barcode as an image file, choosing from formats like PNG, JPEG, and PDF. Here, we save it as 'barcode.png'. Run the project to generate the image, which can be found in the bin folder. To add value text below the barcode, use barcode.AddBarcodeValueTextBelowBarcode(). Run the program again to see the updated barcode image with text. If questions arise, contact our support team for assistance.

Get stated with IronBarcode 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 Read Barcodes in C# for .NET 5 using Iron Barcode
NEXT >
How to Read Multiple Barcodes at Once in C#