ByteScout Barcode Reader SDK - C# - Decode page by page from TIFF - ByteScout

ByteScout Barcode Reader SDK – C# – Decode page by page from TIFF

  • Home
  • /
  • Articles
  • /
  • ByteScout Barcode Reader SDK – C# – Decode page by page from TIFF

How to decode page by page from TIFF in C# using ByteScout BarCode Reader SDK

This code in C# shows how to decode page by page from TIFF with this how to tutorial

Decode page by page from TIFF is easy to implement in C# if you use these source codes below. What is ByteScout BarCode Reader SDK? It 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 help you to decode page by page from TIFF in your C# application.

This rich sample source code in C# for ByteScout BarCode Reader SDK includes the number of functions and options you should do calling the API to decode page by page from TIFF. 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! You can use these C# sample examples in one or many applications.

Free trial version of ByteScout BarCode Reader SDK is available for download from our website. Get it to try other source code samples for C#.

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 Bytescout.BarCodeReader; namespace BarcodesFromTIFF { class Program { static void Main() { Reader reader = new Reader(); reader.RegistrationName = "demo"; reader.RegistrationKey = "demo"; // Limit search to 1-dimensional barcodes only (exclude 2D barcodes to speed up the processing). // Change to barcodeReader.BarcodeTypesToFind.SetAll() to scan for all supported 1D and 2D barcode types // or select specific type, e.g. barcodeReader.BarcodeTypesToFind.PDF417 = True reader.BarcodeTypesToFind.All1D = true; // Input filename string fileName = "multipage.tif"; // Pages from which barcodes to be fetched int[] readFromPages = { 1, 2, 4, 6 }; foreach (var pageNo in readFromPages) { Console.WriteLine("\n\nReading barcodes from TIFF page {0}...", pageNo); // Decoding barcodes from TIFF on page-by-page basis, instead of reading whole page FoundBarcode[] barcodes = reader.ReadFrom(fileName, (pageNo - 1)); // Found results foreach (FoundBarcode barcode in barcodes) { Console.WriteLine("Found Barcode, Type: '{0}', Value: '{1}', Position: {2}", barcode.Type, barcode.Value, barcode.Rect); } } // Cleanup reader.Dispose(); Console.WriteLine(); Console.WriteLine("Press any key to continue."); Console.ReadKey(); } } }

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