Is there a decent free API/component for printing barcodes in C#?
Asked
Active
Viewed 1.3e+01k times
63
-
1See similar question that may help: http://stackoverflow.com/questions/1998209/how-to-generate-barcode-from-a-string-using-c – Scott W Jan 11 '10 at 18:45
-
now, you can use ZXing library, it is on apache 2 license. https://github.com/micjahn/ZXing.Net/blob/master/COPYING free to use in commercial app – toha May 20 '23 at 05:05
3 Answers
59
Could the Barcode Rendering Framework at Codeplex GitHub be of help?

Mika Sundland
- 18,120
- 16
- 38
- 50

Svish
- 152,914
- 173
- 462
- 620
-
4Hint - You need to download the source file in order to find some sample projects that show some examples. There doesn't appear to be anything on the website. – John M Oct 20 '11 at 19:03
-
9Quick an easy "Hello World" c# sample: Add Reference -> Browse -> Zen.Barcode.Core.dll. Then add in your code using Zen.Barcode **Code39 Examples:** `Code39BarcodeDraw barcode39 = BarcodeDrawFactory.Code39WithoutChecksum;` `pictureBox1.Image = barcode39.Draw("Hello World", 40);` PitureBox1 will now display the barcode type 39. It's readable by a scanner. – Patratacus Aug 16 '13 at 16:54
-
-
4
52
I do recommend BarcodeLibrary (already removed from codeproject), but https://github.com/barnhill/barcodelib looks like its copy on github.
Here is a small piece of code of how to use it.
BarcodeLib.Barcode barcode = new BarcodeLib.Barcode()
{
IncludeLabel = true,
Alignment = AlignmentPositions.CENTER,
Width = 300,
Height = 100,
RotateFlipType = RotateFlipType.RotateNoneFlipNone,
BackColor = Color.White,
ForeColor = Color.Black,
};
Image img = barcode.Encode(TYPE.CODE128B, "123456789");

Andrei Schneider
- 3,618
- 1
- 33
- 41