ByteScout Barcode Reader SDK - C# - Inspect Decoded Barcodes - ByteScout

ByteScout Barcode Reader SDK – C# – Inspect Decoded Barcodes

  • Home
  • /
  • Articles
  • /
  • ByteScout Barcode Reader SDK – C# – Inspect Decoded Barcodes

inspect decoded barcodes in C# with ByteScout BarCode Reader SDK

Learn to code in C# to make inspect decoded barcodes with this simple How-To tutorial

Here you may get thousands pre-made source code samples for simple implementation in your own programming C# projects. ByteScout BarCode Reader SDK was created to assist inspect decoded barcodes in C#. ByteScout BarCode Reader SDK is the SDK for barcode decoding. Can read all popular types from Code 128, GS1, UPC and Code 39 to QR Code, Datamatrix, PDF417. Images, pdf, TIF images and live web camera are supported as input. Designed to handle documents with noise and defects. Includes optional splitter and merger for pdf and tiff based on barcodes. Batch mode is optimized for high performance with multiple threads. Decoded values can be exported to XML, JSON, CSV or into custom data format.

Want to speed up the application development? Then this C#, code samples for C#, developers help to speed up the application development and writing a code when using ByteScout BarCode Reader SDK. Just copy and paste this C# sample code to your C# application’s code editor, add a reference to ByteScout BarCode Reader SDK (if you haven’t added yet) and you are ready to go! Updated and detailed documentation and tutorials are available along with installed ByteScout BarCode Reader SDK if you’d like to learn more about the topic and the details of the API.

Trial version along with the source code samples for C# can be downloaded from our website

On-demand (REST Web API) version:
 Web API (on-demand version)

On-premise offline SDK for Windows:
 60 Day Free Trial (on-premise)

Program.cs
      
using System; using System.Drawing.Imaging; using System.IO; using Bytescout.BarCodeReader; namespace InspectDecodedBarcodes { class Program { static int i = 0; const string ImageFile = "Code_39.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.Code39 = true; reader.InspectDecodedBarcodes += Reader_InspectDecodedBarcodes; // 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(); } /// <summary> /// Inspect decoded barcode event /// </summary> /// <param name="sender"></param> /// <param name="image"></param> private static void Reader_InspectDecodedBarcodes(object sender, System.Drawing.Image image) { var imageFile = {code}quot;page{++i}.png"; image.Save(imageFile, ImageFormat.Png); Console.WriteLine({code}quot;Inspected image file saved as ${imageFile}"); // You should explicitly dispose the image object to avoid resource leaks. image.Dispose(); } } }

ON-PREMISE OFFLINE SDK

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

Explore ByteScout BarCode Reader SDK Documentation

Explore Samples

Sign Up for ByteScout BarCode Reader SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

VIDEO

ON-PREMISE OFFLINE SDK

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

Explore ByteScout BarCode Reader SDK Documentation

Explore Samples

Sign Up for ByteScout BarCode Reader SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next