VB.NET PDF-417 Reader & Scanner SDK


How to scan, read PDF417 barcode images in Visual Basic .NET WinForms, WPF application?

How to read, scan, decode PDF417 images in VB.NET class, ASP.NET Web & Windows applications

  • Scan PDF-417 barcode in VB.NET class, Console applications
  • Read PDF-417 barcode in VB.NET ASP.NET web projects
  • Read, decode PDF-417 images in Visual Studio VB.NET Windows Forms applications
  • Easy and simple to integrate PDF-417 reader component (single dll file) into your VB.NET project
  • Detailed tutorials on read barcode in asp.net c#, read barcode in c# windows
  • Complete developed in C# 2005, for .net framework 2.0 and later version
  • Scanning, decoding PDF-417 from multiple image formats, like BMP, GIF, JPEG, PNG, TIFF formats
  • Scanning, reading PDF-417 from multi-page TIFF documents


How to read, scan PDF-417 2D barcode image in VB.NET application

  1. Download .NET Barcode Reader Library
  2. Install VB.NET library to scan PDF-417 images in VB.NET apps
  3. Step by Step Tutorial












Scan, Read PDF-417 barcodes from images is one of the barcode reading functions in .NET Barcode Reader SDK control. It is compatible for Microsoft Visual Studio .NET framework 2.0 and later version. VB.NET barcode scanner is a robust and mature .net barcode recognition component for VB.NET projects. You can easily scan and decode linear, 2d barcodes from image documents in your VB.NET class, console application, ASP.NET web projects, and VB.NET Windows software.
To help .net developers easiy integrate barcode reader control into your .net projects, we provide detailed online tutorial for
VB.NET Barcode Reader component supports scanning and reading 20+ linear, 2d barcodes, including
You may also be interested in:


Quick to scan PDF-417 in VB.NET WinForms, WPF application

Here we will demonstrate how to scan and recognize PDF-417 (2D stacked barcode symbology) using the VB.NET Barcode Reader library.

You can implement PDF-417 barcode scanning with a direct method call in VB.NET. The core scanning method accepts an image source and target barcode type as input parameters.

  1. Call the core decoding method BarcodeScanner.Scan().
  2. Pass the barcode image file path as the first parameter.
  3. Specify the barcode type as BarcodeType.PDF417.
  4. The method returns a string array containing all decoded barcode data.

' Scan and decode PDF-417 barcode from image file
Dim datas As String() = BarcodeScanner.Scan("pdf-417-barcode-image.gif", BarcodeType.PDF417)





How to extract scanned PDF417 barcode property information in VB.NET?

Here we will explain how to retrieve full structural and metadata properties from scanned PDF417 (2D stacked barcode symbology) using the VB.NET Barcode Reader library.

You can extract complete PDF417 barcode metadata from the scanned BarcodeDetail object.

Call the GetBarcodeProps() method to obtain a dedicated PDF417Props (PDF417 property entity) object.

This object includes structure settings, encoding modes, and Macro PDF417 extended information.

Supported PDF417 Core Properties

  • ColumnCount: Gets the number of data columns (excludes start/stop patterns and row indicators).
  • RowCount: Gets the total number of rows in the PDF417 symbol.
  • DataMode: Gets the encoding data mode. Returns PDF417DataMode.Mix if multiple modes are used.
  • ECL: Gets the error correction level used during encoding.

Supported Macro PDF417 Properties

  • IsMacro: Indicates whether the barcode is a Macro PDF417 symbol.
  • MacroSegmentIndex: Gets the segment index (starting from 0).
  • MacroFileID: Gets the file ID as a list of codewords (range: 0 - 899).
  • IsMacroLastSegment: Indicates whether this is the final segment in the group.
  • MacroOptFieldEnable: Indicates whether optional metadata fields are included.

Optional Macro PDF417 Fields

  • MacroFileName: File name
  • MacroSegmentCount: Total segment count
  • MacroTimeStamp: Timestamp
  • MacroSender: Sender information
  • MacroAddressee: Addressee information
  • MacroFileSize: File size
  • MacroChecksum: Checksum value

' Initialize scanning configuration for PDF417
Dim ops As New ScanOptions(BarcodeType.PDF417)
' Perform PDF417 barcode scanning
Dim result As BarcodeDetail() = BarcodeScanner.Scan(imgFilePath, ops)

' Validate scanning results
If result IsNot Nothing AndAlso result.Length > 0 Then
    ' Iterate all detected barcode records
    For Each b As BarcodeDetail In result
        Console.WriteLine("Message: {0}", b.GetMessage())

        ' Check if the barcode type is PDF417
        If b.Type = BarcodeType.PDF417 Then
            ' Convert to dedicated PDF417 property object
            Dim props As PDF417Props = CType(b.GetBarcodeProps(), PDF417Props)

            ' Output basic structure properties
            Console.WriteLine("Column:      {0}", props.ColumnCount.ToString())
            Console.WriteLine("Row:         {0}", props.RowCount.ToString())
            Console.WriteLine("Data Mode:   {0}", props.DataMode.ToString())
            Console.WriteLine("ECL:         {0}", props.ECL.ToString())

            ' Check and output Macro PDF417 information
            Console.WriteLine("Is Macro PDF417:       {0}", props.IsMacro)
            If props.IsMacro Then
                Console.WriteLine("Segment Index:       {0}", props.MacroSegmentIndex)
                Console.WriteLine("File ID:             ")

                ' Output Macro File ID codewords
                If props.MacroFileID IsNot Nothing AndAlso props.MacroFileID.Length > 0 Then
                    For Each v As Integer In props.MacroFileID
                        Console.WriteLine("                     " & v)
                    Next
                End If

                Console.WriteLine("Is Last Segment:     {0}", props.IsMacroLastSegment)
                Console.WriteLine("Optional Field Enable:   {0}", props.MacroOptFieldEnable)

                ' Output optional Macro fields if enabled
                If props.MacroOptFieldEnable Then
                    Console.WriteLine("File Name:               {0}", props.MacroFileName)
                    Console.WriteLine("Segment Count:           {0}", props.MacroSegmentCount)
                    Console.WriteLine("Timestamp:               {0}", props.MacroTimeStamp)
                    Console.WriteLine("Sender:                  {0}", props.MacroSender)
                    Console.WriteLine("Addressee:               {0}", props.MacroAddressee)
                    Console.WriteLine("File Size:               {0}", props.MacroFileSize)
                    Console.WriteLine("Checksum:                {0}", props.MacroChecksum)
                End If
            End If
        End If
    Next
End If




Scan, read Macro PDF417 barcodes in Visual Basic .NET Windows application

Macro PDF417 supports splitting large file data into multiple separate PDF417 symbols. This function is similar to the Structured Append feature used in QR Code and Data Matrix. Each symbol stores built-in control metadata.

The original complete data can be reconstructed correctly regardless of the scanning sequence.

Macro PDF417 Properties

  • File ID: Barcodes with the same File ID belong to the same data group.
  • Segment Index: Defines the data sequence. The first segment starts at 0.
  • Is Last Segment: Indicates whether the current symbol is the final data block.

You can retrieve full Macro PDF417 metadata using advanced scanning methods in VB.NET.

  1. Call BarcodeScanner.ScanInDetails() to scan the image and load full barcode metadata.
  2. Check if the barcode is a Macro PDF417.
  3. Read File ID, segment index, and last-segment status.
  4. Extract the raw segmented data for reconstruction.

Public Shared Sub ReadMacroPDF417()
    ' Define the path of the barcode image file
    Dim imageFilePath As String = "..."
    
    ' Scan all PDF417 symbols in the target image
    Dim datas As BarcodeDetail() = BarcodeScanner.ScanInDetails(imageFilePath, BarcodeType.PDF417)
    
    ' Iterate all scanned barcode records
    For j As Integer = 0 To datas.Length - 1
        ' Check if current barcode is Macro PDF417
        Console.WriteLine(" Is Macro PDF417:    " & datas(j).isMacroPDF417())
        ' Get Macro PDF417 File ID
        Console.WriteLine(" File id:      " & datas(j).getMacroPDF417FileID())
        ' Check if it is the last segment
        Console.WriteLine(" Is Last Segment:    " & datas(j).isMacroPDF417LastSegment())
        ' Get segment index (starts from 0)
        Console.WriteLine(" Segment Index:      " & datas(j).getMacroPDF417SegmentIndex())
        ' Get File ID string (3 digits = one 900-based value)
        Console.WriteLine(" File ID:            " & datas(j).getMacroPDF417FileID())
        
        ' Extract raw data if it is a valid Macro PDF417
        If datas(j).isMacroPDF417() Then
            Dim barcodeSegmentData As String = datas(j).Data
            ' Add your data reconstruction logic here
        End If
    Next
End Sub












Common Asked Questions

What is PDF417 used for?

PDF417 is a high density, two-dimensional stacked barcode format used in a variety of applications, such as driver's license, airline boarding pass, transport, and inventory management. You use OnBarcode VB.NET Barcode Reader SDK to scan and decode text from PDF417 barcode images in VB.NET, Windows Forms, Console, WPF application.

How to scan PDF417 barcode image?

You can use camera with app installed on smartphone, or barcode scanner device or software to scan, read PDF417 barcodes. VB.NET Barcode Scanner library enables you to quickly integrate PDF417 barcode reading feature in Visual Basic .NET, Windows Forms, WPF console and Windows applications.

Can iPhone or Android phones scan PDF417 barcode?

With OnBarcode best-in-class VB.NET PDF417 scanner, you can scan PDF417 codes with iPhone or Android mobile devices.

What is the difference between a PDF417 and a QR Code?

Both PDF417 and QR Code are two-dimensional (2D) barcode formats. PDF417 can be scannable even if up to 50% of it is damaged. QR Code can accept up to 30% damages. VB.NET Barcode Scanner library supports both PDF417 and QR Code 2d barcode reading and recognition in .NET class library, console, WinForms, WPF projects.












































































Terms of Use | Privacy Policy
Copyright © OnBarcode.com . All rights reserved.