ByteScout Data Extraction Suite - C# - Decoding barcodes from pdf by pages with barcode reader sdk - ByteScout

ByteScout Data Extraction Suite – C# – Decoding barcodes from pdf by pages with barcode reader sdk

  • Home
  • /
  • Articles
  • /
  • ByteScout Data Extraction Suite – C# – Decoding barcodes from pdf by pages with barcode reader sdk

decoding barcodes from pdf by pages with barcode reader sdk in C# and ByteScout Data Extraction Suite

Learn to code decoding barcodes from pdf by pages with barcode reader sdk in C#: How-To tutorial

Easy to understand coding instructions are written to assist you to try-out the features without the requirement to write your own code. Decoding barcodes from pdf by pages with barcode reader sdk in C# can be applied with ByteScout Data Extraction Suite. ByteScout Data Extraction Suite is the bundle that includes three SDK tools for data extraction from PDF, scans, images and from spreadsheets: PDF Extractor SDK, Data Extraction SDK, Barcode Reader SDK.

C# code snippet like this for ByteScout Data Extraction Suite works best when you need to quickly implement decoding barcodes from pdf by pages with barcode reader sdk in your C# application. Just copy and paste this C# sample code to your C# application’s code editor, add a reference to ByteScout Data Extraction Suite (if you haven’t added yet) and you are ready to go! Further improvement of the code will make it more robust.

If you want to try other samples for C# then free trial version of ByteScout Data Extraction Suite is available on 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 Bytescout.BarCodeReader; namespace BarcodesFromPDF { 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 = "example.pdf"; // Pages from which barcodes to be fetched int[] readFromPages = { 1, 2 }; foreach (var pageNo in readFromPages) { Console.WriteLine("\n\nReading barcodes from PDF page {0}...", pageNo); // Decoding barcodes from PDF 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 Data Extraction Suite Home Page

Explore ByteScout Data Extraction Suite Documentation

Explore Samples

Sign Up for ByteScout Data Extraction Suite 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 Data Extraction Suite Home Page

Explore ByteScout Data Extraction Suite Documentation

Explore Samples

Sign Up for ByteScout Data Extraction Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next