ByteScout Barcode Reader SDK - C# - Decode Code 128 - ByteScout

ByteScout Barcode Reader SDK – C# – Decode Code 128

  • Home
  • /
  • Articles
  • /
  • ByteScout Barcode Reader SDK – C# – Decode Code 128

How to decode code 128 in C# using ByteScout BarCode Reader SDK

Write code in C# to decode code 128 with this step-by-step tutorial

Learn how to decode code 128 in C# with this source code sample. ByteScout BarCode Reader SDK is the SDK for reading of barcodes from PDF, images and live camera or video. Almost every common type like Code 39, Code 128, GS1, UPC, QR Code, Datamatrix, PDF417 and many others are supported. Supports noisy and defective images and docs. Includes optional documents splitter and merger for pdf and tiff based on found barcodess. Batch mode is supported for superior performance using multiple threads. Decoded values are easily exported to JSON, CSV, XML and to custom format. It can decode code 128 in C#.

The SDK samples like this one below explain how to quickly make your application do decode code 128 in C# with the help of ByteScout BarCode Reader SDK. Follow the instructions from the scratch to work and copy the C# code. Use of ByteScout BarCode Reader SDK in C# is also explained in the documentation included along with the product.

Trial version of ByteScout BarCode Reader SDK is available for free. Source code samples are included to help you with your C# app.

Try ByteScout BarCode Reader SDK today:  60 Day Free Trial (on-premise) or  Web API (on-demand version)

Program.cs
      
using System; using System.IO; using Bytescout.BarCodeReader; namespace ReadCode128 { class Program { const string ImageFile = "Code_128.png"; static void Main() { Console.WriteLine("Reading barcode(s) from image {0}", Path.GetFullPath(ImageFile)); Reader reader = new Reader(); reader.RegistrationName = "demo"; reader.RegistrationKey = "demo"; // Set barcode type to find reader.BarcodeTypesToFind.Code128 = true; /* ----------------------------------------------------------------------- NOTE: We can read barcodes from specific page to increase performance. For sample please refer to "Decoding barcodes from PDF by pages" program. ----------------------------------------------------------------------- */ // Read barcodes FoundBarcode[] barcodes = reader.ReadFrom(ImageFile); foreach (FoundBarcode barcode in barcodes) { Console.WriteLine("Found barcode with type '{0}' and value '{1}'", barcode.Type, barcode.Value); } // Cleanup reader.Dispose(); Console.WriteLine("Press any key to exit.."); Console.ReadKey(); } } }

Try ByteScout BarCode Reader SDK today:  60 Day Free Trial (on-premise) or  Web API (on-demand version)

VIDEO

ON-PREMISE VERSION INFORMATION

Get 60 Day Free Trial or Visit ByteScout BarCode Reader SDK Home Page

Explore ByteScout BarCode Reader SDK Documentation

Get ByteScout BarCode Reader SDK Free Training

WEB API

Get Your Free API Key

Explore Web API Documentation

Tutorials:

prev
next