Barcode for .NET Suite > Generate Barcode in C#

How to Generate Barcodes in C# for .NET Application

Using Barcode Generator to Print 1D and 2D Barcode Images in C# for .NET Application
  • Developed completely in C# with full integration into MS .NET Framework & many Windows systems
  • Compatible with ISO/IEC & GS1 symbology specifications to print scannable barcode images
  • Using Barcode Control Library to add barcodes in ASP.NET websites/webservice, WinForms, etc
  • Easy to create 1D and matrix barcode images in Visual C#.NET & console applications
  • Support multiple high quality linear barcodes generation, including alphanumeric barcodes
  • Support major bi-dimensional barcode symbologies, including Data Matrix, QR Code and PDF-417
  • Available for saving barcode pictures with different formats, like jpg, png, tiff, bitmap, etc
  • Reliable C# barcode generator component to print barcode for all scanners and printers
KA.Barcode for .NET Suite supports generating barcode images for ASP.NET Web, .NET WinForms, Crystal Reports, and RDLC Report applications with C#.NET programming. It allows creating more than 20 barcode types including linear and matrix barcodes:
Linear Barcodes: Codabar, Code 39, Code 128, EAN-128, EAN-13, UPC-A, EAN-8, UPC-E, Code11, Identcode, Interleaved 2 of 5, MSI Plessey, Intelligent Mail, Code 93, Leitcode, Planet, Postnet, ISSN, ISBN, Code 2 of 5, ITF-14, RM4SCC.
Matrix Barcodes: QR Code, Data Matrix, PDF-417.
Download KA.Barcode for .NET Suite Trial Version
Perpetual Evaluation
We offer perpectual evaluation/trial version of this barcode generator library.
Restrictions of Evaluation
If you want to use generated barcodes for commercial application, you need to buy our developer licenses for the barcodes generated by evaluation version will include a "KA Barcode" watermark.
How to Install KA.Barcode for .NET Suite
Unzip the trial freeware package, and you'll find "KeepAutomation.Barcode.Windows.dll" and "KeepAutomation.Barcode.Web.dll" in the package. Add the barcode dll(s) to your Visual Studio reference. After that, copy sample code into your project to insert barcode pictures or images according to tutorial.
  • Create a new project and select "Add Reference...", then click "Browse..." to locate "KeepAutomation.Barcode.Windows.dll" or "KeepAutomation.Barcode.Web.dll"
  • Then click "OK". Immediately, you'll find "KeepAutomation.Barcode.Windows" or "KeepAutomation.Barcode.Web" in the References
How to Generate Barcodes with C#.NET Class
KA.Barcode Generator SDK for C#.NET supports multiple C# methods to create barcodes and output to different C# objects. Here is the Visual C# sample code for you:
C# Sample code
     using KeepAutomation.Barcode.Bean;
BarCode barcode = new BarCode();
barcode.Symbology = KeepAutomation.Barcode.Symbology.Code39;
barcode.CodeToEncode = "111222333";
barcode.ChecksumEnabled = true;
barcode.X = 1;
barcode.Y = 50;
barcode.BarCodeWidth = 100;
barcode.BarCodeHeight = 70;
barcode.Orientation = KeepAutomation.Barcode.Orientation.Degree90;
barcode.BarcodeUnit = KeepAutomation.Barcode.BarcodeUnit.Pixel;
barcode.DPI = 72;
barcode.ImageFormat = System.Drawing.Imaging.ImageFormat.Gif;

/* Output barcode images to different objects
barcode.generateBarcodeToStream("Stream Object");
barcode.generateBarcodeToGraphics("Graphics Object");
barcode.generateBarcodeToGraphics("HttpResponse Object");
How to Generate Barcodes for ASP.NET with C# Class
KeepAutomation barcode generator for .NET Suite allows users to create barcode images in Visual C# class library. Below are some C# sample codes for barcode generation in ASP.NET. Or you may view more details of barcode generation for ASP.NET.
  1. Open Visual Studio to create a web application project.
  2. Add our "KeepAutomation.Barcode.Web.dll" to your ASP.NET Web project reference.
  3. And then enter your C# class code by clicking "View Code" in "Default.aspx".
  4. Now, copy following sample code into "Default.aspx.cs".
  5. After that, run the project and you can find the generated barcode image.
C# Sample code
     using KeepAutomation.Barcode.Bean;

BarCode code39 = new BarCode();
code39.Symbology = KeepAutomation.Barcode.Symbology.Code39;
code39.CodeToEncode = "39393939";
How to Generate Barcodes in .NET WinForms with C# Class
Developers can also print linear and 2D barcode images in .NET Windows application using Visual C# codes. Please follow the tutorial below for barcoding. You can also view more detailed information of barcode generation in .NET WinForms.
  1. Start with Visual Studio, and create a Windows application project.
  2. Then add "KeepAutomation.Barcode.Windows.dll" to the Forms project reference.
  3. Drag and drop a button to the form and double click it for compiling C# barcode generation code
  4. Now, run this windows project and you can find the created barcode image.
C# Sample code
     using KeepAutomation.Barcode.Bean;

BarCode code128 = new BarCode();
code128.Symbology = KeepAutomation.Barcode.Symbology.CodeAuto;
code128.CodeToEncode = "128128128";
You can also refer to this barcode properties page to customize your barcode images.
How to Create Barcodes for Crystal Reports with C# Class
This C#.NET Barcode Generator also supports barcode printing in .NET Crystal Reports. Here is more information about C# barcode creation in Crystal Reports.
How to Create Barcodes for RDLC Reports with C# Class
.NET Developers can easily print high-quality barcode images in RDLC Local Reports using Visual C# programming. You can get details about C# barcode generation in RDLC Reports here.
Download & InstallationBarcode in C#For ASP.NETFor .NET WinFormsFor Crystal ReportsFor RDLC ReportsUsing VB.NETData Matrix for C#PDF417 for C#QR Code for C#moreCodabar for C#Code 39 for C#Code 128 for C#EAN-8 for C#EAN-13 for C#EAN 128 for C#Intelligent Mail for C#Interleaved 2 of 5 for C#ISBN for C#ITF-14 for C#RM4SCC for C#UPC-A for C#UPC-E for C#more
KeepAutomation provides complete barcode automation solutions for add barcode display 2-dimensional, barcode generation capacity api, and barcode mobile applications. We recommend the customers use high quality document controls: ASP.NET Document Viewer, ASP.NET MVC Document Viewer, Document Viewer ASP.NET C#, ASP.NET PDF Viewer, ASP.NET Word Viewer, ASP.NET Excel Viewer, ASP.NET PDF Editor, MVC PDF Viewer, ASP.NET Annotate PDF, c# pdf sdk, C# merge PDF files, Split PDF in C#, C# View, edit PDF online , C# Convert PDF to Tiff, C# Convert PDF to text, txt, .net imaging sdk, C# PDF metadata edit from