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

ByteScout Barcode Reader SDK – C# – Decode Patch Code

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

How to decode patch code in C# with ByteScout BarCode Reader SDK

The tutorial shows how to decode patch code in C#

The sample source codes on this page shows how to decode patch code in C#. 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 and you can use it to decode patch code with C#.

C# code samples for C# developers help to speed up coding of your application when using ByteScout BarCode Reader SDK. Follow the instructions from the scratch to work and copy the C# code. Enjoy writing a code with ready-to-use sample C# codes.

Download free trial version of ByteScout BarCode Reader SDK from our website with this and other source code samples for C#.

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

Program.cs
      
using System; using System.IO; using Bytescout.BarCodeReader; namespace ReadPatchCode { class Program { const string ImageFile = "PatchCode.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.PatchCode = true; // Add vertical orientations to analysis reader.Orientation = OrientationType.Default | OrientationType.VerticalFromBottomToTop | OrientationType.VerticalFromTopToBottom; /* ----------------------------------------------------------------------- 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 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