QR Code Image Sample - pqScan.com
Java Code 128 Scanner SDK Building up perfect quality Code 93 barcode scanning in Java Download Trial Purchase Now

Java: Scan and Decode Code 128

back to home  >  Java Barcode Scanner SDK  >  How to Read Barcodes in Java  >  Scan and Decode Code 128 Using Java

pqScan Java Barcode Scanner SDK is a high-end Java library for linear (1D) and two-dimensional (2D) barcodes reading and decoding. All superior bar code reading functions are well compiled into a single jar file, named pqScan.BarcodeReader.jar. This Java software supports most popular linear (1D) barcode symbols, like Code 128, Code 39 and EAN/UPC. In this article, Code 128 barcode scanning from image in Java application will be talked.

In all, three aspects are included. The first aspect is for installation of Java Code 128 Scanner Library Control. The second one provides Java programming APIs for accurate bar code recognition. And the last is a free online demo code for Java Code 128 detecting and decoding from image source. To see more barcodes scanning tutorials, please refer to: Java Barcode Scanning Tutorial Overview. Or you may directly choose from the right menu bar.

Java: Installation of Code 128 Barcode Scanner

After downloading pqScan Java Control for Code 128 Recognition), you can easily integrate it into various Java programs, including Swing, Applet, Java Bean, and J2SE applications. Within two steps, installation can be finished. The first step is to copy pqScan.BarcodeReader.jar to your Java project library folder. And the second one is to add this jar file to Java classpath.

Java: Robust APIs for Code 128 Reading

Requirement: Scan Code 128 from Image Only

If you are searching for a Java Barcode Scanner Component to read Code 128 1D barcode symbol from image and this type is the only barcode on your loaded image source file. Then, the following APIs can help you achieve fast Code 128 reading and decoding in Java project.

// Define Code 128 as target barcode symobl and read it only from image file at the disk in Java.
public static BarcodeResult[] Scan(String filename, BarCodeType barType);
// Define Code 128 as target barcode symobl and read it only from BufferedImage object in Java.
public static BarcodeResult[] Scan(BufferedImage image, BarCodeType barType);
// Define Code 128 as target barcode symobl and read it only from InputStream object in Java.
public static BarcodeResult[] Scan(InputStream imageStream, BarCodeType barType);

Requirement: Recognize ALL Barcodes from Image

Here're another three APIs available for Java Code 128 barcode reading. If you are in need of recognizing all (Code 128) bar codes (more than one type) from image file format using Java class programming, try the following APIs. The decoded result (in array form) will include all barcode types and data information detected on image source.

// Detect and decode Code 128 from local image file.
public static BarcodeResult[] Scan(String filename);
// Detect and recognize Code 128 from BufferedImage object.
public static BarcodeResult[] Scan(BufferedImage image);
// Detect and read Code 128 from InputStream object.
public static BarcodeResult[] Scan(InputStream imageStream);

Java: Free Demo for Code 128 Reading

You may have a try with the following ReadCode128Demo class to quickly read Code 128 barcode symbol from sample Jpeg image file in Java class application. As you see, only a few lines of Java programming code can implement highly accurate Code 128 barcode reading and recognizing.

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

public class ReadCode128Demo
{
    public static void main(String[] args)
    {
        try
        {
            // Read Code 128 1D barcode(s) from Jpeg image file on local disk.
            BarcodeResult[] results = BarcodeScanner.Scan("C:/sample.jpg", BarCodeType.Code128);

            for(int i = 0; i < results.length; i++)
            {
                // Show all recognized Code 128 information in data array.
                System.out.println(results[i].getData() + "--" + results[i].getBarType());
            }
        }
        catch (Exception e)
        {
            e.printStackTrace();
        }
    }
}
pqScan SDK
Java Barcode Scanner SDK
Online Guide
Barcode Recognition Using Java
Barcode Type
Java QR Code Reading Sample Java Data Matrix Reading Sample Java PDF-417 Reading Sample Java Aztec Code Reading Sample Java EAN-13 Reading Sample Java EAN-8 Reading Sample Java UPC-A Reading Sample Java UPC-E Reading Sample Java Code 128 Reading Sample Java Code 39 Reading Sample Java Code 93 Reading Sample Java Codabar Reading Sample Java ITF-14 Reading Sample View All Barcodes >>
It makes my application simple. The best part of the product is barcode name recognition. I have used it many times with nice results. Job well done! Chelsea Cole