QR Code Image Sample - pqScan.com
Java PDF-417 Scanner sDK Building up perfect quality PDF-417 barcode scanning in Java Download Trial Purchase Now

Java PDF-417 Barcode Scanning

back to home  >  Java Barcode Scanner SDK  >  How to Read Barcodes in Java  >  Java PDF-417 Scanner Library

pqScan Java Library for Barcode Recognition is a competitive barcode scanning solution on the market. It provides high efficiency APIs to read and scan 2D bar codes, like PDF-417, Aztec Code, QR Code, and Data Matrix. On this online tutorial, we will focus on how to install Java PDF417 Scanner Library into your Java application and how to use Java APIs and demo code to quickly read and decode PDF-417 two-dimensional bar code from loaded image source.

In general, raster image file formats like Bmp, Gif, Jpeg/Jpg, Png, and Tiff/Tif are supported by our barcode reading component for Java. In addition, Java AWT image object is also allowed. By using designed APIs, Java programmers are empowered to read only PDF-417 bar code from image file or decode all detected barcode symbols on it.

In the following three sections, we will introduce how to install Java PDF417 Scanner to your Java application, how to choose suitable APIs for different requirements, and how to use free Java class programming code to scan and recognize PDF-417 barcode symbol from loaded image source.

How to Install Java Library

It's quite easy to install Java PDF417 Barcode Scanner to your Java application and two steps are involved. See as below.

  • Copy pqScan.BarcodeReader.jar to your Java project library folder.
  • Add pqScan.BarcodeReader.jar to your Java classpath.

How to Choose Java API

For different PDF-417 bar code symbol requirements, different Java APIs should be used. We provide specific APIs for two situations that you may take into consideration. Three APIs are available for a situation that there's only a need of reading PDF-417 2D barcode symbol from loaded image file. Of course, if there are more than one barcode types (besides PDF417 font) on your image source and you want to decode them all, another three APIs should be applied. Detailed explanations for all six APIs are demonstrated as follows.

// Read and recognize PDF417 from local image file in Java application.
public static BarcodeResult[] Scan(String filename);
// Recognize PDF-417 from BufferedImage object in Java application.
public static BarcodeResult[] Scan(BufferedImage image);
// Decode and detect PDF417 from the InputStream object in Java application.
public static BarcodeResult[] Scan(InputStream imageStream);
// Choose to scan and decode PDF417 only from image file at the disk in Java application.
public static BarcodeResult[] Scan(String filename, BarCodeType barType);
// Choose to read and recognize PDF417 only from BufferedImage object in Java application.
public static BarcodeResult[] Scan(BufferedImage image, BarCodeType barType);
// Choose to scan and detect PDF417 only from InputStream object in Java application.
public static BarcodeResult[] Scan(InputStream imageStream, BarCodeType barType);

How to Read PDF-417 in Java Class

As you see above, you can use several Java APIs to recognize PDF-417 bar code from image file. And here, we only give an example of using API "Scan(String filename, BarCodeType barType)" in Java class programming. This free Java sample code will directly to detect and decode PDF-417 on loaded Jpg image.

import com.pqscan.barcodereader.BarcodeResult;
import com.pqscan.barcodereader.BarcodeScanner;
import com.pqscan.barcodereader.BarCodeType;

public class ReadPDF417Demo
{
    public static void main(String[] args)
    {
        try
        {
            // Select PDF417 as target barcode symbol and read all from Jpeg image file.
            BarcodeResult[] results = BarcodeScanner.Scan("C:/sample.jpg", BarCodeType.PDF417);

            for(int i = 0; i < results.length; i++)
            {
                // Output all recognized bar code data information.
                System.out.println(results[i].getData() + "--" + results[i].getBarType());
            }
        }
        catch (Exception e)
        {
            e.printStackTrace();
        }
    }
}
pqScan SDK
Java Barcode Scanner Control
Online Guide
Recognize Barcode for Java
Barcode Type
QR Code Scanning for Java Data Matrix Scanning for Java PDF-417 Scanning in Java Aztec Code Scanning in Java EAN-13 Scanning in Java EAN-8 Scanning in Java UPC-A Scanning in Java UPC-E Scanning in Java Code 128 Scanning in Java Code 39 Scanning in Java Code 93 Scanning in Java Codabar Scanning in Java ITF-14 Scanning in Java View All Barcodes >>
Honestly speaking, I've tested several other barcode recognition controls from various companies, and I'm glad that I choose yours in the end. Excellent! Bob Dellinger