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

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

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

decoding barcodes from pdf by pages with barcode reader sdk in C# with ByteScout Premium Suite

Learn decoding barcodes from pdf by pages with barcode reader sdk in C#

ByteScout tutorials describe the stuff for programmers who use C#. ByteScout Premium Suite was created to assist decoding barcodes from pdf by pages with barcode reader sdk in C#. ByteScout Premium Suite is the bundle that includes twelve SDK products from ByteScout including tools and components for PDF, barcodes, spreadsheets, screen video recording.

C# code snippet like this for ByteScout Premium 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 Premium Suite (if you haven’t added yet) and you are ready to go! This basic programming language sample code for C# will do the whole work for you in implementing decoding barcodes from pdf by pages with barcode reader sdk in your app.

If you want to try other samples for C# then free trial version of ByteScout Premium 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 Premium Suite Home Page

Explore ByteScout Premium Suite Documentation

Explore Samples

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

Explore ByteScout Premium Suite Documentation

Explore Samples

Sign Up for ByteScout Premium Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next