Generating a barcode with ZXing.Net

1. Installing ZXing.Net library.

Using nuget package installer install ZXing.Net libarary. Once installed you should be able to see zxing and zxing.presentation references.

2. Using ZXing library in a c# class. 

string content = barcodeNumber;

IBarcodeWriter writer = new BarcodeWriter
Format = BarcodeFormat.EAN_13,
Options= new ZXing.Common.EncodingOptions
Width =200,

Bitmap barcodeBitmap;
var barcode= writer.Write(content);
MemoryStream stream = new MemoryStream();
barcode.Save(stream, ImageFormat.Bmp);


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s