XDoc.PDF
Features
Tech Specs
How-to VB.NET
Pricing
How to Start Convert PDF Work with PDF Modules PDF Document PDF Pages Text Image Graph & Path Annotation, Markup & Drawing Redaction Security Digital Signature Forms Watermark Bookmark Link File Attachment File Metadata Printing Work with Other SDKs Barcode read Barcode create OCR Twain

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.


Overview



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:


  RasterEdge.Imaging.Basic.dll


  RasterEdge.Imaging.Basic.Codec.dll


  RasterEdge.Imaging.Drawing.dll


  RasterEdge.Imaging.Font.dll


  RasterEdge.Imaging.Processing.dll


  RasterEdge.XDoc.Raster.dll


  RasterEdge.XDoc.Raster.Core.dll


  RasterEdge.XDoc.PDF.dll


  RasterEdge.Imaging.Barcode.Scanner.dll


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()
settings.AddTypesToRead(RasterEdge.Imaging.Barcode.Scanner.BarcodeType.Code128)

' 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())
Next