QR Code Image Sample - pqScan.com
.NET Barcode Scanner SDK Building up Perfect Quality Barcode Reading Software for .NET Online Demo Download Trial Purchase Now

How to Read Barcode from PDF in VB.NET?

back to home  >  .NET Barcode Scanner SDK  >  Read Barcodes in .NET  >  VB.NET Barcode Scanning from PDF

pqScan Barcode Reader Control for .NET enables Visual Basic developers to recognize and read barcodes from images. By using this robust control together with pqScan .NET PDF to Image Conversion Control, VB.NET developers can easily scan and decode 1D & 2D barcodes from PDF file as well. Many popular bar code symbologies are supported, such as Code 128, Code 39, ITF-14, EAN/UPC, QR Code, PDF-417, Data Matrix and so on.

The operation of reading barcode images from PDF document in VB.NET project is simple to complete. Actually, there are two steps to do this. You need to convert PDF file to image(s) firstly, and then scan and decode barcode information in the output image(s).

Read Barcode in PDF - Visual Basic Demo

In this article, we will take 2D barcode QR Code as an example, to tell VB.NET programmer how to read bar code from PDF file.

  • Open Visual Studio and create a new Console Application using VB.NET.
  • Download pqScan .NET PDF to Image Converter and .NET Barcode Decoder online.
  • Integrate "PQScan.PDFToImage.dll" and "PQScan.BarcodeScanner.Matrix.dll" to created Visual Basic project by adding reference.
  • Use the following vb.net class code to implement QR Code reading from PDF document.
Imports System.Drawing
Imports PQScan.PDFToImage
Imports PQScan.BarcodeScanner.Matrix

Namespace ReadBarcodeInPDF
  Class Program
  Private Shared Sub Main(args As String())
    ' Create an instance of PQScan.PDFToImage.PDFDocument object.
    Dim pdfDoc As New PDFDocument()

    ' Load a PDF file.

    ' Convert the first page of PDF to an image.
    Dim bmp As Bitmap = pdfDoc.ToImage(0)

    ' Read all QR Code information.
    Dim barcodeResults As BarcodeResult() = BarCodeScanner.Scan(bmp, BarCodeType.QRCode)

    For Each barcodeInfo As BarcodeResult In barcodeResults

    End Sub
  End Class
End Namespace
pqScan SDK
.NET Barcode Reader SDK .NET PDF to Image SDK
Online Guide
Recognize Barcode in .NET Convert PDF to Image in .NET
Barcode Type
Scan and Read QR Code Scan and Read Data Matrix Scan and Read PDF-417 Scan and Read Aztec Code Scan and Read EAN-13 Scan and Read EAN-8 Scan and Read UPC-A Scan and Read UPC-E Scan and Read Code 128 Scan and Read Code 39 Scan and Read Code 93 Scan and Read Codabar Scan and Read ITF-14
I can't say enough about the excellent SDKs that pqScan provides. It is an absolute pleasure to order so cost-effective products. I highly recommend you to have a try. Regan Smith