C# Code 39 Reader SDK Integration

Online tutorial for reading & scanning Code 39 barcode images using C#.NET class

How to read, scan, decode Code 39 images in C#.NET class, ASP.NET Web & Windows applications

  • Scan Code 39 barcode in C# class, Console applications
  • Read Code 39 barcode in C# ASP.NET web projects
  • Detailed tutorials on read barcode in asp.net c#, read barcode in c# windows application
  • Read, decode Code 39 images in Visual Studio C#.NET Windows Forms applications
  • Easy and simple to integrate Code 39 reader component (single dll file) into your C# project
  • Complete developed in C#.net 2005, for .net framework 2.0 and later version
  • Scanning, decoding Code 39 from multiple image formats, like BMP, GIF, JPEG, PNG, TIFF formats
  • Scanning, reading Code 39 from multi-page TIFF documents

How to scan, read Code 39 barcodes from image using C#

  1. Download C# Barcode Reader Library
  2. Install C# library to read barcode Code 39 from images in .NET apps
  3. Step by Step Tutorial










C# Code 39 Reader Introduction

Top
C# Code 39 Reader SDK is a high performance C# linear and 2d barcode recognition SDK for Microsoft Visual Studio C#.NET platform.

Scan and read Code 39 barcodes from image files is one of the barcode decoding functions in .NET Barcode Reader component. To help .net developers easiy integrate barcode reader control into your .net projects, we provide detailed online tutorial for
C#.NET Barcode Reader component supports scanning and reading 20+ linear, 2d barcodes, including
You may also be interested in:




Install C#.NET Barcode Reader Control to Your C# project

Top
  • Copy OnBarcode.Barcode.BarcodeScanner.dll to your C#.NET project folder (do not copy dll file to your project bin folder).
  • Add OnBarcode.BarcodeReader.dll to your C# project reference.




Reading Code 39 in C# Class

Top
  • Call BarcodeScanner.Scan() method to get all scanned Code 39 text string in your C# class.

    Pass your Code 39 barcode image file path or image in Stream, byte array object, and Code 39 barcode type (BarcodeType.Code 39) as method parameters.

  • Call BarcodeScanner.ScanInDetails() method to get detected Code 39 barcodes with detailed information.

    The scanned Code 39 barcode information includes Code 39 barcode location, rotation, data in ASCII label, in bytes, and Code 39 check character if any.
string[] datas = BarcodeScanner.Scan("code39-barcode-sample.png", BarcodeType.Code39);

BarcodeDetail[] datasInDetail = BarcodeScanner.ScanInDetails(
    "code39-barcode-sample.png", BarcodeType.Code39);





Scan Code 39 extension (full ASCII) mode

If the scanned Code 39 is an extended Code 39 (full ASCII mode), you need choose barcode type as BarcodeType.Code39Extension.

Code 39 extension barcode may include ASCII control characters, which are not printable. You can use method GetASCIITextMessage() to read Code 39 text string with control characters replaced with visible labels.

BarcodeDetail[] datasInDetail = BarcodeScanner.ScanInDetails(
    "barcode-code39-extension-sample.png", BarcodeType.Code39Extension);

foreach (BarcodeDetail barcodeData in datasInDetail) {
    Debug.WriteLine("Data: " + barcodeData.Data);
    Debug.WriteLine("ASCII: " + barcodeData.GetASCIITextMessage());
}




Scan Code 39 barcode with check character in C#

The Code 39 and Code 39 extension ISO standard does not define the criteria for determining whether a Code 39 barcode includes a checksum. If your scanning Code 39 or Code 39 extension barcode include checksum, you need apply the following setting in ScanOption object.

  • Enable property Code39WithCheckCharacter to true. The barcode reader library will verify the scanned Code 39 data with the last digit checksum, and return Code 39 data without checksum included.

  • Call method GetMessage() to get the Code 39 data without checksum character.

  • Call method GetBarcodeProps() to retrieve the Code 39 barcode information, where you can get the Code 39 checksum character in property Checksum

ScanOptions ops = new ScanOptions(BarcodeType.Code39);
//  true: to verify checksum and extract Code39Props from the candidator.
ops.Code39WithCheckCharacter = true;
BarcodeDetail[] result = BarcodeScanner.Scan(imgFilePath, ops);
if (result != null && result.Length > 0)
{
    foreach (BarcodeDetail b in result)
    {
        Console.WriteLine("Message: {0}", b.GetMessage());
        Code39Props props = (Code39Props)b.GetBarcodeProps();
        if (props != null && props.HasChecksum)
            Console.WriteLine("Checksum: {0} ('{1}')", 
                props.Checksum, props.ShowChar);
        else
            Console.WriteLine("No Checksum");
    }
}
else
    Console.WriteLine("No Barcode Found");





C# Barcode Reading & Scanning Tutorials

Top

Barcode Reader SDK for C#.NET - Barcode Image Reading













Common Asked Questions

What is Code 39 barcode used for?

Code 39, also known as Code 3 of 9, was the first barcode to encode both numbers and letters. It is most commonly used in the inventory, government, military and electronics industries. Using C# barcode reader library, you can easily scan and recognize Code 39 text from barcode images in C# ASP.NET Core, MVC, WinForms, WPF apps.

What is the Code 39 on a barcode reader?

Code 39 is a 1d barcode symbology that encodes up to 43 characters, including uppercase letters, numbers, and special symbols. Code 39 extension supports encoding full 128 ASCII characters. Using C# Barcode Scanner library, you can scan and decode all 128 ASCII characters from Code 39 and Code 39 extension barcode images in C# class.

How to decode Code 39?

To scan and decode Code 39 text from a barcode image, a barcode scanner device or reader software will scan all bar and space modules on the Code 39 barcode symbology, and use a character map to translate the bar and space groups into Code 39 data characters. OnBarcode C# Barcode Scanner library will help C# developer quickly integrate Code 39 barcode scanning and reading features in a C# ASP.NET, MVC, web and Windows application.

What is the difference between Code 39 and Code 128 barcodes?

Code 128 requires a checksum. If the Code 128 barcode is damaged, it may still be scannable. Code 39 checksum is optional. If the Code 39 barcode without checksum is damaged, it won't be scannable. In C# class, you can scan, recognize and decode both Code 128 and Code 39 barcode data from image files using C# Barcode Reader library.




































Terms of Use | Privacy Policy
Copyright © OnBarcode.com . All rights reserved.