.NET Barcode Reader Lib > How to Decode Barcode in VB.NET > PDF417 VB.NET Barcode Reader SDK, also provide PDF417 C# Barcode Reading

Scan PDF417 Barcode with VB.NET Barcode Reader


How to Recognise & Scan Data Matrix Barcode Image Using VB.NET Barcode Reader Library
  • Advanced 1D & 2D barcode reading library dll for .NET applications since 2003
  • Capable of reading & scanning popular 2d barcode uisng VB.NET Class, like PDF-417, Data Matrix & QR-Code
  • Offer complete VB demo code for .NET, ASP.NET, .NET Class Library PDF-417 recognition applications
  • Able to read & scan the maximum PDF 417 barcode on a source file and output scanned data value
  • Besides Visual Basic, you can also read PDF417 2d barcode using C# using BarcodeLib C# tutorials.
  • Able to read & recognize all PDF 417 barcodes in a source image within seconds
  • Offer several affordable license types for this professional .NET Barcode Reader Library
This document provides technical guidance for scanning and reading PDF-417 barcode images in Visual Basic .NET applications, with specific support for Windows Forms and WPF.

VB.NET PDF417 2D Barcode Reader Library

QR Code, Data Matrix, Code 128, GS1, EAN/UPC. Multi-thread reading in VB.NET Windows Forms, WPF application.

Download Now
NuGet Ready
.NET 5+
.NET Framework 4.x, 3.x, 2.x


Scanning and reading PDF-417 barcodes from images is a core function of the BarcodeLib .NET Barcode Reader SDK control. It is compatible with Microsoft Visual Studio .NET Framework 2.0 and later versions. The BarcodeLib VB.NET barcode scanner is a robust and mature .NET barcode recognition component for VB.NET projects. You can easily scan and decode linear and 2D barcodes from image documents in your VB.NET class, console application, ASP.NET web projects, and VB.NET Windows software (including WinForms and WPF).
How to Start PDF-417 Visual Basic .NET Barcode Recognition
  1. Dowload trial version firstly and then you can find VB.NET Barcode Reader DLL ("BarcodeLib.BarcodeReader.dll").
  2. Create your VB.NET project and add VB.NET Barcode Reader DLL ("BarcodeLib.BarcodeReader.dll") to the project reference.


How to Decode PDF-417 Barcode with VB.NET Barcode Reader Control
Our Barcode Reader Library SDK for .NET is easy to use. Please directly use the following one line free VB code to scan PDF-417 barcode image. Here, "pdf417-vbnet.gif" is a sample image.
     Dim datas() As String = BarcodeReader.read("c:/pdf417-vbnet.gif", BarcodeReader.PDF417)
Then, all PDF-417 barcodes data in "pdf417-vbnet.gif" image file will be decoded at a time.



How to Adjust PDF-417 VB.NET Barcode Reader Control for Fast Reading
You can customize our PDF-417 .NET Barcode Reader SDK to improve barcode recognition rate. This is suitable especially for a large size source image file. Two situations are here:

Situation 1: Want to Recognise Maximum One PDF-417 Barcode Image Using VB.NET PDF-417 Scanner Library

If you want to read the maximum one PDF-417 barcode in your image source (per image, page in tiff or pdf document), you can adjust property maxOneBarcodePerPage to "true".
  1. After this, our VB.NET PDF-417 Scanner Library will stop read the PDF-417 as soon as it detects one PDF-417 barcode image.
  2. If it is faulse, our our VB.NET PDF-417 Scanner Library DLL will use total 5 algorithms and each will read the whole source file from 4 directions.

Situation 2: Want to Recognise Specific Part of a Image File Where the PDF-417 Is Located

To save scanning time, you can directly customize VB.NET Barcode Reader DLL to scan that specific area on source image file.
  1. To do so, please clarify the left top point and right bottom point of the specific area (the point X, Y values are expressed in percentage of the whole image, so image most left top point is (0%, 0%), and most right bottom point is (100%, 100%).
Now, you can use the following free sample VB.NET code to read the specific area. In this case, our VB.NET Barcode Reader DLL will read the top 20% and bottom 20% of a sample image "pdf417-vbnet.gif".
     Dim setting As OptimizeSetting = New OptimizeSetting()

setting.setMaxOneBarcodePerPage(True)

Dim top20 As ScanArea = New ScanArea(New Drawing.PointF(0.0F, 0.0F), New Drawing.PointF(100.0F, 20.0F))

Dim bottom20 As ScanArea = New ScanArea(New Drawing.PointF(0.0F, 80.0F), New Drawing.PointF(100.0F, 100.0F))

Dim areas As List(Of ScanArea) = New List(Of ScanArea)
areas.Add(top20)
areas.Add(bottom20)

setting.setAreas(areas)

Dim datas() As String = BarcodeReader.read("c:/pdf417-vbnet.gif", BarcodeReader.PDF417, setting)


How to Extract Scanned PDF-417 Barcode Property Information in VB.NET

This section explains how to retrieve full structural and metadata properties from scanned PDF-417 barcodes using the BarcodeLib VB.NET Barcode Reader library. You can extract complete PDF-417 barcode metadata from the scanned BarcodeDetail object.
  • Call the GetBarcodeProps() method to obtain a dedicated PDF417Props (PDF-417 property entity) object.
  • This object includes structure settings, encoding modes, and Macro PDF-417 extended information.


Supported PDF-417 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 PDF-417 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 PDF-417 Properties:

  • IsMacro: Indicates whether the barcode is a Macro PDF-417 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 PDF-417 Fields:

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


Scan and Read Macro PDF-417 Barcodes in Visual Basic .NET Windows Applications

Macro PDF-417 supports splitting large file data into multiple separate PDF-417 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 PDF-417 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 PDF-417 metadata using advanced scanning methods in VB.NET.
  • Call BarcodeScanner.ScanInDetails() to scan the image and load full barcode metadata.
  • Check if the barcode is a Macro PDF-417.
  • Read File ID, segment index, and last-segment status.
  • Extract the raw segmented data for reconstruction.


Summary

Key Contents in this page:
  • The BarcodeLib VB.NET Barcode Reader SDK is designed for .NET Framework 2.0 and later, and works seamlessly with both WinForms and WPF projects.
  • Ensure that the target barcode type is correctly specified as BarcodeType.PDF417 for standard PDF-417 symbols.
  • For Macro PDF-417, use the isMacroPDF417() method to verify the symbol type before accessing Macro-specific properties.
  • The ScanInDetails() method returns a BarcodeDetail array that contains both core barcode data and extended metadata.
  • When reconstructing segmented data from Macro PDF-417 symbols, the MacroFileID and MacroSegmentIndex values must be used to order segments correctly, regardless of the scan order.
  • For optimal performance in WinForms or WPF applications, consider using ScanOptions to configure scanning regions or multi-threading where appropriate.
How to Decode 1D & 2D Barcode Images Using VB.NET Barcode Scanner Control
Related PDF-417 Barcode Recognition & Decoding tutorials: