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

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

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

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

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

The samples of source code documentation give a quick and simple method to apply a required functionality into your application. ByteScout Barcode Suite helps with decoding barcodes from pdf by pages with barcode reader sdk in C#. ByteScout Barcode Suite is the bundle that privides 3 SDK products to generate barcodes (Barcode SDK), read barcodes (Barcode Reaer SDK) and read and write spreadsheets (Spreadsheet SDK).

The below SDK samples describe how to quickly make your application do decoding barcodes from pdf by pages with barcode reader sdk in C# with the help of ByteScout Barcode Suite. Just copy and paste this C# sample code to your C# application’s code editor, add a reference to ByteScout Barcode Suite (if you haven’t added yet) and you are ready to go! Enjoy writing a code with ready-to-use sample C# codes to implement decoding barcodes from pdf by pages with barcode reader sdk using ByteScout Barcode Suite.

On our website you may get trial version of ByteScout Barcode Suite for free. Source code samples are included to help you with your C# application.

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 Barcode Suite Home Page

Explore ByteScout Barcode Suite Documentation

Explore Samples

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

Explore ByteScout Barcode Suite Documentation

Explore Samples

Sign Up for ByteScout Barcode Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next