ByteScout Barcode Reader SDK - C# - Decode GS1 DataBar Omnidirectional - ByteScout
Announcement
Our ByteScout SDK products are sunsetting as we focus on expanding new solutions.
Learn More Open modal
Close modal
Announcement Important Update
ByteScout SDK Sunsetting Notice
Our ByteScout SDK products are sunsetting as we focus on our new & improved solutions. Thank you for being part of our journey, and we look forward to supporting you in this next chapter!

ByteScout Barcode Reader SDK – C# – Decode GS1 DataBar Omnidirectional

  • Home
  • /
  • Articles
  • /
  • ByteScout Barcode Reader SDK – C# – Decode GS1 DataBar Omnidirectional

ByteScout Barcode Reader SDK – C# – Decode GS1 DataBar Omnidirectional

Program.cs

using System;
using System.IO;

using Bytescout.BarCodeReader;

namespace ReadGS1DataBarOmnidirectional
{
    class Program
    {
        const string ImageFile = "GS1DataBarOmnidirectional.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.GS1DataBarOmnidirectional = true;

            // 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);
            }

            Console.WriteLine("Press any key to exit..");
            Console.ReadKey();
        }
    }
}

Tutorials:

prev
next