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

Java Codabar Reading Guide

back to home  >  Java Barcode Scanner SDK  >  How to Read Barcodes in Java  >  Guide for Codabar Barcode Reading

pqScan Java Barcode Decoder Toolkit allows you to integrate high-end Codabar scanning functions into various Java applications, like Applet, Java Bean, Swing, and J2SE. Superior barcode reading algorithm will be used to scan loaded image file source from four directions which guarantees fast reading speed, as well as Codabar barcode decoding accuracy.

With integration of pqScan Barcode Scanner SDK for Java, you can use various APIs to detect and decode Codabar barcode from raster image files and Java AWT image objects. For example, you can read multiple barcodes in one image and read all barcode types besides Codabar from loaded image source at a time.

Easy to Integrate into Java Project

Integrating pqScan Barcode Decoder Toolkit into Java project is an easy task. You only need to copy Java barcode reader library from downloaded package to your project folder. Later, directly add this mature library component to your Java classpath. Done! You can load a sample image file that contains Codabar and have a test.

Available APIs for Codabar Reading

To begin with, you may firstly look at available APIs that can be used in Java Codabar barcode scanning application. There're six APIs in the following box that empowers Java programmers to read Codabar only or read all contained barcodes from image file. As you see, these APIs supports reading barcode symbols from three kinds of forms which are image file on your disk, buffered image object, and input stream object.

// Using this API for UPC-E barcode scanning from image file on your disk.
public static BarcodeResult[] Scan(String filename, BarCodeType barType);
// Using this API for UPC-E barcode scanning from buffered image object.
public static BarcodeResult[] Scan(BufferedImage image, BarCodeType barType);
// Using this API for UPC-E barcode scanning from input stream object.
public static BarcodeResult[] Scan(InputStream imageStream, BarCodeType barType);
// Using this API for all barcodes (UPC-E type included) scanning from image file on your disk.
public static BarcodeResult[] Scan(String filename);
// Using this API for all barcodes (UPC-E type included) scanning from buffered image object.
public static BarcodeResult[] Scan(BufferedImage image);
// Using this API for all barcodes (UPC-E type included) scanning from input stream object.
public static BarcodeResult[] Scan(InputStream imageStream);

Java Example for Codabar Decoding

This is a simple example of using pqScan Java Barcode Reader Control to decode Codabar 1D barcode(s) only from a Jpg image. If your image file source contains other 1D or 2D barcode symbols besides Codabar, you may use the above later three APIs accordingly. For other barcode symbols reading tutorial, please refer to: Java Barcode Reader SDK - How to Overview.

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

public class ReadCodabarDemo
{
    public static void main(String[] args)
    {
        try
        {
            // Specify Codabar to be read from a Jpg sample image.
            BarcodeResult[] results = BarcodeScanner.Scan("C:/sample.jpg", BarCodeType.Codabar);

            for(int i = 0; i < results.length; i++)
            {
                // Show recognized result.
                System.out.println(results[i].getData() + "--" + results[i].getBarType());
            }
        }
        catch (Exception e)
        {
            e.printStackTrace();
        }
    }
}
pqScan SDK
Barcode Scanner SDK in Java
Online Guide
Java Barcode Scanning Demo
Barcode Type
Use Java to Read QR Code Use Java to Read Data Matrix Use Java to Read PDF-417 Use Java to Read Aztec Code Use Java to Read EAN-13 Use Java to Read EAN-8 Use Java to Read UPC-A Use Java to Read UPC-E Use Java to Read Code 128 Use Java to Read Code 39 Use Java to Read Code 93 Use Java to Read Codabar Use Java to Read ITF-14 View All Barcodes >>
Never disappointing, your product and service are what make the license worth its price! Well done pqScan! Chad Mayer