How to do barcode 128 type A B C in C#

  • 635 Views
  • Last Post 12 March 2019
Berm San posted this 12 March 2019

I need to create barcode 128 type B in pictureBox.Image for my project but it's not working. I can create only barcode 128 Auto.

 

Order By: Standard | Newest | Votes
admin posted this 12 March 2019

You can use ItextSharp to generate a barcode.

Right click on your project, then select Nuget Manage Packages, search itextsharp and install it.

Next, you can use the following code to create a barcode 128 type A,B,C

Barcode128 code128          = new Barcode128();
code128.CodeType            = Barcode.CODE128;
code128.ChecksumText        = true;
code128.GenerateChecksum    = true;
code128.Code                = "Barcode 128 type B";
System.Drawing.Bitmap bmp    = new System.Drawing.Bitmap(code128.CreateDrawingImage(System.Drawing.Color.Black, System.Drawing.Color.White));
pictureBox1.Image = bmp;

Enter a text, then click the button to generate a barcode

barcode 128 type A,B,C

Berm San posted this 12 March 2019

Thank you for your comment.

I try to do but there is no code128B.

It shows only code128, code128_RAW and code128_UCC.

Close