VB.NET PDF: How to HTML5 PDF Viewer PDF Create PDF Export File & Page Process PDF Read PDF Write Form Process Document Protect Annotation & Drawing PDF Print WPF PDF Viewer Work with Other SDKs Barcode Read Barcode Create OCR Twain
Barcode Read
Home ›› XDoc.PDF ›› VB.NET PDF: Read Barcode

VB.NET PDF - How to Decode Barcode from PDF in VB.NET

VB.NET Guide for Decoding Linear and 2D Barcodes from PDF in VB.NET Class

Look for HTML5 PDF Editor?

EdgePDF: ASP.NET PDF Editor is the best HTML5 PDF Editor and ASP.NET PDF Viewer based on XDoc.PDF, JQuery, HTML5. It supports ASP.NET MVC and WebForms projects.


One of the solutions by which you can use to improve your PDF document reading with high capacity is to embed a barcode reader add-on. And here, we specifically recommend this VB.NET PDF barcode reading application to you. This PDF barcode decoding library SDK for VB.NET class is exclusively designed for detecting and reading most common linear and two-dimensional barcode symbols from PDF document using VB.NET methods.

VB.NET Code: Read Barcode from PDF Document

Add necessary references:










Use corresponding namespaces;

  using RasterEdge.Imaging.Basic;

  using RasterEdge.XDoc.PDF;

  using RasterEdge.Imaging.Barcode.Scanner;

Code sample listed below illustrate how to read barcode images from PDF file in VB.NET project.

Dim inputFilePath As String = Program.RootPath + "\\" + "1_barcode.pdf"

' open the document
Dim doc As PDFDocument = New PDFDocument(inputFilePath)
Dim page As PDFPage = doc.GetPage(0)

' set the reading settings
Dim settings As ReaderSettings = New ReaderSettings()

' read the barcodes in the page
Dim barcodes As Barcode() = BarcodeReader.ReadBarcodes(settings, page)
For Each barcode As Barcode In barcodes
    Console.WriteLine("Message:  " + barcode.DataString)
    Console.WriteLine("Location: " + barcode.BoundingRectangle.ToString())