ByteScout Barcode Reader SDK - C# - Set Barcode Decoding Profiles - ByteScout

ByteScout Barcode Reader SDK – C# – Set Barcode Decoding Profiles

  • Home
  • /
  • Articles
  • /
  • ByteScout Barcode Reader SDK – C# – Set Barcode Decoding Profiles

How to set barcode decoding profiles in C# using ByteScout BarCode Reader SDK

The tutorial shows how to set barcode decoding profiles in C#

Learn how to set barcode decoding profiles in C# with this source code sample. ByteScout BarCode Reader SDK is the barcode decoder with support for code 39, code 128, QR Code, Datamatrix, GS1, PDF417 and all other popular barcodes. Can read barcodes from images, pdf, tiff documents and live web camera. Supports noisy and damaged documents, can split and merge pdf and tiff documents based on barcodes. Can export barcode decoder results to XML, JSON, CSV and into custom data structures. It can set barcode decoding profiles in C#.

The SDK samples like this one below explain how to quickly make your application do set barcode decoding profiles in C# with the help of ByteScout BarCode Reader SDK. This C# sample code is all you need for your app. Just copy and paste the code, add references (if needs to) and you are all set! Further enhancement of the code will make it more vigorous.

Our website provides trial version of ByteScout BarCode Reader SDK for free. It also includes documentation and source code samples.

Try ByteScout BarCode Reader SDK today: Get 60 Day Free Trial or sign up for Web API

Program.cs
      
using System; using Bytescout.BarCodeReader; namespace Profiles { /// <summary> /// This example demonstrates the use of profiles. Profiles are set of properties /// allowing to apply them to Reader in any combination quickly. You can use /// predefined profiles or create you own in JSON format like in this example. /// </summary> class Program { static void Main(string[] args) { // Create Bytescout.BarCodeReader.Reader instance using (Reader reader = new Reader()) { reader.RegistrationName = "demo"; reader.RegistrationKey = "demo"; // Apply predefined profiles: // enable Code39; // enable EAN-13; // render PDF at 150 DPI resoultion. reader.Profiles = "code39, ean13, pdf150dpi"; /* ----------------------------------------------------------------------- NOTE: We can read barcodes from specific page to increase performance. For sample please refer to "Decoding barcodes from PDF by pages" program. ----------------------------------------------------------------------- */ // Decode and show barcodes from sample1.pdf reader.ReadFrom("sample1.pdf"); foreach (FoundBarcode foundBarcode in reader.FoundBarcodes) Console.WriteLine("Found \"{0}\" barcode with value \"{1}\"", foundBarcode.Type, foundBarcode.Value); } using (Reader reader = new Reader()) { reader.RegistrationName = "demo"; reader.RegistrationKey = "demo"; // Load and apply custom profiles reader.LoadProfiles("profiles.json"); reader.Profiles = "negative-distorted-datamatrix"; // Decode and show barcodes from sample2.png reader.ReadFrom("sample2.png"); foreach (FoundBarcode foundBarcode in reader.FoundBarcodes) Console.WriteLine("Found \"{0}\" barcode with value \"{1}\"", foundBarcode.Type, foundBarcode.Value); } Console.WriteLine("Press any key to exit..."); Console.ReadKey(); } } }

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

VIDEO

ON-PREMISE VERSION

Get 60 Day Free Trial or Visit ByteScout BarCode Reader SDK page

Explore ByteScout BarCode Reader SDK documentation

WEB API

Sign Up for free Web API key

Explore Web API Documentation

Tutorials:

prev
next