.NET Barcode for (.NET Barcode Generator supports Linear, PDF417, Data Matrix and QR-Code)

.NET Barcode  >  .NET Barcode Generate Guide  >  .NET Code 39 Generator for .NET, C#, ASP.NET, VB.NET

 

.NET Code-39 Generator for .NET, C#, ASP.NET, VB.NET

Create & Generate Code-39 Barcodes in C#, VB.NET, ASP.NET

Code 39 (also known as "USS Code 39", "Code 3/9", "Code 3 of 9", "USD-3", "Alpha39", "Type 39") is a barcode symbology that can encode uppercase letters (A through Z), digits (0 through 9) and a handful of special characters like the $ sign.

Code 39 is restricted to 44 characters. In Full ASCII Code 39 Symbols 0-9, A-Z, "." ,and "-" are the same as their representations in Code 39. Lower case letters, additional punctuation characters and control characters are represented by sequences of two characters of Code 39.

.NET Barcode Code 39 prints:

  • 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
  • Uppercase letters (A - Z)
  • - (Dash), $ (Dollar), % (Percentage), (Space), . (Point), / (Slash), + (Plus)

.NET Barcode Code 39 Extension prints:

  • all 128 ASCII characters



.NET Barcode Code-39 Generator - C#, VB.NET Code-39 Generating Sample Code



1. How to generate Code-39 barcodes in C# Class?

   using BusinessRefinery.Barcode;

   // construct a linear barcode object
   Linear barcode = new Linear();  
    
   // set linear barcode symbolgoy type to Code-39
   barcode.Symbology = Symbology.CODE39;
    
   // set Code-39 code text to encode		      
   barcode.Code = "CSHARP-CODE39-BARCODE";  
    
   //draw barcode and save into image file in gif format   
   barcode.drawBarcode2ImageFile("code-39-in-csharp.gif");    

2. How to generate Code-39 barcodes in VB.NET Class?

// construct a linear barcode object
Dim barcode As BusinessRefinery.Barcode.Linear
barcode = New BusinessRefinery.Barcode.Linear()

// set linear barcode symbolgoy to Code-39
barcode.Symbology = BusinessRefinery.Barcode.Symbology.CODE39

// set Code-39 code text to encode	
barcode.Code = "VBNET-CODE39-BARCODE"

//draw barcode and save into image file in gif format  
barcode.drawBarcode2ImageFile("code-39-in-vbnet.gif")


3. How to draw Code-39 barcodes to image files (GIF, JPEG, BMP, PNG, & TIFF)?

            using BusinessRefinery.Barcode;

            Linear barcode = new Linear();
            barcode.Symbology = Symbology.CODE39;
            barcode.Code = "CODE39-BARCODE-CSHARP";
            barcode.drawBarcode2ImageFile("code-39-in-csharp.gif");

You can draw other file formats, by change file types to .jpg, .bmp, .png, and .tif.



4. How to draw & print Code-39 barcodes to .NET objects like Graphics, Stream, Bitmap?

            using BusinessRefinery.Barcode;

            Linear barcode = new Linear();
            barcode.Symbology = Symbology.CODE39;
            barcode.Code = "CODE39-BARCODE-CSHARP";

            barcode.drawBarcode2Stream("Stream object");

            Bitmap barcodeInBitmap = barcode.drawBarcodeOnBitmap();

            barcode.drawBarcodeOnGraphics("Graphics object");



5. How to create Code-39 barcodes in C# or VB.NET Windows Application using .NET Barcode Generator Windows Control Library?

  1. add BusinessRefinery.Barcode.Win.dll to your .NET Windows Application project reference

  2. add .NET Barcode Generator .NET Windows Control Library to .NET Visual Studio Toolbox



6. How to create Code-39 barcodes in ASP.NET Web Application using ASP.NET Barcode Generator Web Control Library?

  1. add BusinessRefinery.Barcode.Web.dll to your ASP.NET project reference

  2. add ASP.NET Barcode Generator ASP.NET Web Control Library to .NET Visual Studio Toolbox



.NET Barcode Code-39 Generator - Barcode Property Settings



Basic

  • Symbology : Barcode symbology type.

    HTTP Parameter: symbology; Default Value: Symbology.CODE128 (7)

  • Code : Barcode encoding data value.

    HTTP Parameter: code; Default Value: ""

  • AddChecksum : Apply Checksum digit at the end of some linear barcode value.

    HTTP Parameter: add-checksum; Default Value: true

Barcode Size

  • BarcodeUnit : Unit of meature for all size related properties. 0: Pixel (default); 1: CM; 2: Inch.

    HTTP Parameter: barcode-unit; Default Value: 0 (UOM_PIXEL)

  • BarWidth : bar module width (X), default is 3 pixel

    HTTP Parameter: bar-width; Default Value: 3

  • BarHeight : bar module height (Y), default is 60 pixel

    HTTP Parameter: bar-height; Default Value: 60

  • LeftMargin : generated barcode image left margin

    HTTP Parameter: left-margin; Default Value: 0.0f

  • RightMargin : generated barcode image right margin

    HTTP Parameter: right-margin; Default Value: 0.0f

  • TopMargin : generated barcode image top margin

    HTTP Parameter: top-margin; Default Value: 0.0f

  • BottomMargin : generated barcode image bottom margin

    HTTP Parameter: bottom-margin; Default Value: 0.0f

  • Resolution : generated barcode image resolution in dpi

    HTTP Parameter: resolution; Default Value: 72 dpi

  • Rotate : barcode rotate angle, valid values: 0 (ROTATE_0), 1 (ROTATE_90), 2 (ROTATE_180), 3 (ROTATE_270)

    HTTP Parameter: rotate; Default Value: 0 (ANGLE_0)

  • BarcodeWidth

    HTTP Parameter: barcode-width; Default Value: 0

  • BarcodeHeight

    HTTP Parameter: barcode-height; Default Value: 0

  • Width : for WinForm Controller only, same as BarcodeWidth

    HTTP Parameter: -; Default Value: 0

  • Height : for WinForm Controller only, same as BarcodeHeight

    HTTP Parameter: -; Default Value: 0

Barcode Text Style

  • DisplayText : set true to draw barcode value text under the barcode

    HTTP Parameter: display-text; Default Value: true

  • DisplayChecksumDigit : set true to display last checksum digit, if any.

    HTTP Parameter: display-checksum-digit; Default Value: true

  • TextFont : drawn barcode value text font style

    HTTP Parameter: text-font; Default Value: new Font("Arial", Font.PLAIN, 11)

  • TextMargin : space between barcode and barcode text

    HTTP Parameter: text-margin; Default Value: 6 pixel

For Code39, Code 2 of 5, Interleaved 2 of 5, ITF-14, Leitcode, & Identcode

  • DisplayStartStopChar : for Barcode Code39 and Code39 extension only, draw start & stop char (*) in the beginning and end of code39

    HTTP Parameter: display-start-stop-char; Default Value: true

  • I : Width of intercharacter gap, This a multiple of X. For Code39 only.

    HTTP Parameter: i; Default Value: 1.0f

  • BarRatio : Wide vs narrow bar width ratio, valid range 2.0 - 3.0 inclusive. For Code39, Code 2 of 5, Interleaved 2 of 5, ITF14, Leitcode & Identcode

    HTTP Parameter: bar-ratio; Default Value: 2.0f

  • BearerBarStyle : For ITF-14 only, The style of bearer bar, it can be frame or horizontal bars only.

    HTTP Parameter: bearer-bar-style; Default Value: BearerBarStyle.Frame

  • BearerBarWidth : For ITF-14 only, The bearer bar size. Valid values are 0-10 which are a multiple of X.

    HTTP Parameter: bearer-bar-width; Default Value: 2.0f





ALL RIGHTS RESERVED. Business Refinery (c) 2006 - 2010. Terms of Use | Privacy Policy