Online Guide

How to Read QR Code from PDF with BC.NetPdfBarcodeReader.All
C# read qr code from PDF file pages with high speed and accuracy.

Guide Overview

If you are looking for a .NET pdf barcode scanner for qr code barcode recognition in c# & vb.net or do not know how to use c# read qr code from pdf file, BC.NetPdfBarcodeReader.All library is the right choice. You can easily read qr code from pdf file in your .NET/C#/VB.NET web and windows projects. Here, we provide a free trial package for your quick evaluation. You can directly download it and add your Visual Studio project reference to our dll library (BC.NetPdfBarcodeReaderTrial.All.dll).

BC.NetPdfBarcodeReader.All

By integrating our .NET pdf barcode scanner library in your Visual Studio .NET project, you are enabled to read qr code from pdf single page and multiple pages.

This page describes how to read qr code from pdf file in c# programming and vb.net programming. And we take a Console Application as an example of how to c# read qr code from pdf. Moreover, a demo project is included in our free trial package. You can download a free trial to test more.

PLEASE NOTE: You need to copy BC.Resources.dll from x86 or x64 folder of the trial package to your C# project bin directory, Bin\Debug. For VB.NET project, you also need to do this but should copy the dll to your project folder Bin\x86\Debug or Bin\x64\Debug.


How to Read QR Code from PDF File in C# & VB.NET

The following sections shows you how to use our .NET pdf barcode scanner library to read qr code from PDF single page and multiple pages.
1. Scan and read qr code from a PDF page
2. Scan and read qr code from PDF pages

How to C# Read QR Code from PDF File

using System;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using System.Drawing.Imaging;
using BC.NetPdfBarcodeReaderTrial.All;
using BC.NetPdfBarcodeReaderTrial.Pdf;

namespace BCNetPdfBarcodeReader
{
    class Program
    {
        static void Main(string[] args)
        {
            ReadQrcodeFromOnePdfPage();
            //ReadQrcodeFromMultiplePdfPages();
        }

        public static void ReadQrcodeFromOnePdfPage()
        {
                PdfDoc pdf = new PdfDoc("test1.pdf");
                pdf.SetDPI = 72;
                Image pageImage = pdf.ConvertToImage(0, 2500, 1000);
                Bitmap bitmap = new Bitmap(pageImage);                
                string[] data = NetPdfBarcodeReader.Recognize(bitmap, NetPdfBarcodeReader.Qrcode);
                foreach (string result in data)
                {
                    Console.WriteLine(result);
                }
                    Console.ReadKey();
        }

        public static void ReadQrcodeFromMultiplePdfPages()
        {
                PdfDoc pdf = new PdfDoc("test3.pdf");
                pdf.SetDPI = 72;
                for (int i = 0; i < pdf.FilePageCount; i++)
                {
                    Image pageImage = pdf.ConvertToImage(i, 1000, 1200);
                    Bitmap bitmap = new Bitmap(pageImage);
                    pageImage.Save("Page" + i + ".jpg", ImageFormat.Jpeg);
                    string[] data1 = NetPdfBarcodeReader.Recognize("Page" + i + ".jpg", NetPdfBarcodeReader.Qrcode);
                    foreach (string result in data)
                  {
                    Console.WriteLine(result);
                  }                          
                }
                    Console.ReadKey();
         }

    }
}

How to VB.NET Read QR Code from PDF File

Imports System
Imports System.IO
Imports System.Collections.Generic
Imports System.Linq
Imports System.Text
Imports System.Drawing
Imports System.Drawing.Imaging
Imports BC.NetPdfBarcodeReaderTrial.All
Imports BC.NetPdfBarcodeReaderTrial.Pdf

Module BCNetPdfBarcodeReader

    Public Sub Main()
        ReadQrcodeFromOnePdfPage()
        'ReadQrcodeFromMultiplePdfPages()

    Public Sub ReadQrcodeFromOnePdfPage()
        Dim pdf As PdfDoc = New PdfDoc("test1.pdf")
        pdf.SetDPI = 72
        Dim pageImage As Image = pdf.ConvertToImage(0, 2500, 1000)
        Dim bitmap As Bitmap = New Bitmap(pageImage)
        Dim data As String() = NetPdfBarcodeReader.Recognize(bitmap, NetPdfBarcodeReader.Qrcode)

        For Each result As String In data
            Console.WriteLine(result)
        Next

        Console.ReadKey()
    End Sub

    Public Sub ReadQrcodeFromMultiplePdfPages()
        Dim pdf As PdfDoc = New PdfDoc("test3.pdf")
        pdf.SetDPI = 72

        For i As Integer = 0 To pdf.FilePageCount - 1
            Dim pageImage As Image = pdf.ConvertToImage(i, 1000, 1200)
            Dim bitmap As Bitmap = New Bitmap(pageImage)
            Dim data1 As String() = NetPdfBarcodeReader.Recognize("Page" & i & ".jpg", NetPdfBarcodeReader.Qrcode)

            For Each result As String In data
                Console.WriteLine(result)
            Next
        Next

        Console.ReadKey()
    End Sub

End Module

Our .NET PDF barcode scanner library can reading not only QR Code from PDF file but also other most popular 1d and 2d barcodes, such as Data Matrix, PDF417, Code 128, Code 39, EAN13, EAN8, UPCA, UPCE, and Interleaved 2 of 5.


How did you get a qr code barcode scanner for pdf file if you want to integrate qr code recognition function into your .NET project programming? In general, search online is a good way. We wonder what search words do you use and find our .NET pdf barcode scanner for qr code. Do you use these words? Like c# pdf barcode scanner for qr code, c# pdf barcode reader for qr code, c# pdf barcode decoder for qr code, c# pdf recognizer for qr code, vb.net pdf barcode scanner for qr code, vb.net pdf barcode reader for qr code, vb.net qr code scanner sdk for pdf file, c# qr code reader for pdf file, .net qr code reader sdk for pdf file, how to decode qr code c# from pdf file, pdf qr code decoder c#, read qr code from pdf c#, c# qrcode reader for pdf, vb.net qr code reader for pdf file, c# read qr code from pdf page, pdf qr code scanner c# web, asp.net qr code reader for pdf, pdf qr code reader c# web, decode qr code from pdf c# windows, decode pdf qrcode vb.net windows, and more.