Code 39 C#.NET Integration Tutorial

Walk Through How to Generate Code 39 Using C#.NET

Barcode for C#
.NET Imaging Component
Home > Barcode in C# > Linear > Code 39
Raster Edge provides a variety of .NET developer tools to generate Code 39 as well as extended Code 39 using Visual C# .NET. The simplest solution to print Code 39 is Code 39 font tool. The Code 39 Barcode Font could be used in almost every application on Windows OS and Mac OS X. When higher quality Code 39 is need, Code 39 Winforms control and/or Code 39 Web form control could be installed in your project.
Related .net document control helps:
asp.net word document viewer: ASP.NET Office Word Document Viewer: view Word doc files online using C# in ASP.NET MVC web applications
sharepoint document viewer: ASP.NET SharePoint Document Viewer: view, annotate, redact documents in SharePoint
asp.net mvc text file viewer: ASP.NET Text file viewer in MVC, WebForms: Open, view, annotate, convert txt files in C# ASP.NET
asp.net edit pdf image: ASP.NET PDF Image Edit Control: online insert, edit PDF images in C#
asp.net pdf document viewer: ASP.NET PDF Document Viewer in C#: open, display, view, annotate, redact Adobe PDF files online in ASP.NET MVC & WebForm...
asp.net annotate pdf: ASP.NET Annotate PDF Control: annotate, comment, markup PDF document online using ASP.NET C#
asp.net document viewer c#: ASP.NET Document Viewer using C#: Open, View, Annotate, Redact, Convert document files in ASP.NET using C#, HTML5, JQuer...
Code 39, also written in Code 3 of 9 or Code 3/9, is a linear barcode encoding numbers 0 through 9, uppercase-letters A through Z, and special characters including -, ., $, /, +, %, and space. Data with variable length could also be carried in Code 39 symbol as data. MOD43 of the sum of the data characters' numerical values is mandatory as described in Code 39 specification, in order to ensure the integrity of data in each Code 39 symbol.
Code 39 in C#.NET - Overview
Code 39 Generation - Sample Code in Visual C# .NET
using RasterEdge.Barcode.Bean;

BarCode code39= new BarCode();

//Set barcode symbology type to Code 39
code39. Symbology = Symbology. Code39;

//Set Code 39 encoding code value. Valid input: Numeric digits 0-9, A-Z, Special characters
including dash, dollar, percentage, space, point, slash and plus. Length: variable.
code39.CodeToEncode = "6663";
code39.ChecksumEnabled = true; // Apply checksum for Code 39 barcode.

//Set Code 39 image size

code39.BarcodeUnit = BarcodeUnit.Pixel;// Unit of measure, Pixel, Cm and Inch supported.
code39.DPI = 72; // Code 39 image resolution in DPI.
code39.X = 3; // Code 39 bar module width (X dimention)
code39.Y = 60; // Code 39 bar module height (Y dimention)
code39.WideNarrowRatio = 2.0f; // Wide bar width vs narrow bar. Valid from 2.of-3.0f.
code39.I = 1.0f; // Space between character symbol, a multiple of X.
code39.LeftMargin = 0; // Left margin size, minimum value is 10X.
code39.RightMargin = 0; // Right margin size, minimum value is 10X.
code39.TopMargin = 0; // Code 39 image top margin size
code39.BottomMargin = 0; // Code 39 image bottom margin size
code39.Orientation = Orientation.Degree0;//Image orientation, 90, 180, 270 degrees supported

//Set Code 39 human readable text style

code39.DisplayText = true; // Display human readable text
code39.TextFont = new Font ("Arial", 10f, FontStyle. Regular);
code39.TextMargin = 6; // Space between barcode and text
code39.DisplayStartStop = true; // Print Code 39 Start & Stop Char *in barcode text
code39.Displaychecksum = true; // Display checksum in the Code 39 barcode text

//Generate Code 39 barcodes in GIF image format
code39.generateBarcodeToImageFile("barcode-code39-csharp.gif");

//Create Code 39 barcodes in Stream object
code39.generateBarcodeToStream(".NET System.IO.Stream Object");

//Draw & Print Code 39 barcodes to Graphics object
code39.generateBarcodeToGraphics(".NET System.Drawing.Graphics Object");

//Generate Code 39 barcodes & write to byte[]
byte[] barcodeInBytes = code39.generateBarcodeToByteArray();

//Generate Code 39 barcodes & encode to System.Drawing.Bitmap object
Bitmap barcodeInBitmap = code39.generateBarcodeToBitmap();

Other image formats including Png, Bmp, Tiff and Jpeg are also available to suit your needs.