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

Scan EAN-13 Using Java Library

back to home  >  Java Barcode Scanner SDK  >  How to Read Barcodes in Java  >  Scan EAN-13 Barcode Using Java Library

Java Barcode Reader Component is fully compiled in Java SDK 1.7 which provides high performance APIs for meeting user's specific requirements of reading and scanning EAN-13 bar code from image file. In all, six methods are provided among which three are used to set EAN-13 as target barcode symbol and read it only and others can help Java developers directly scan and decode all barcode symbols detected on loaded image source, including EAN-13 linear barcode type.

Now let's start to use pqScan Barcode Reader Control for Java in your own application. You will be guided to install this mature Java EAN-13 barcode scanner library firstly. And then all supported APIs are illustrated with detailed explaination for each. What's more, a piece of free Java class programming demo code is provided for you to have a quick and accurate EAN-13 barcode reading and recognition evaluation.

EAN-13 Scanner Installation in Java Application

You may directly download pqScan Java Barcode Scanner SDK through download button above and get the free trial package. After unzipping the package, you will find our Java barcode decoder solution (pqScan.BarcodeReader.jar) according to your platform. Then, do as follows.

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

Available EAN-13 Decoding APIs

Please read the following explainations for each supported EAN-13 barcode recognition API and choose the suitable one for your Java application. There're three forms of image source can be loaded to your Java project. Totally, Java AWT image objects and image file formats like Png, Bmp, Tiff, Jpeg, and Gif are supported.

// Scan and read EAN13 and other symbols from a local image file path.
public static BarcodeResult[] Scan(String filename);
// Scan and recognize EAN13 and other symbols from BufferedImage object.
public static BarcodeResult[] Scan(BufferedImage image);
// Scan and decode EAN13 and other symbols from InputStream object.
public static BarcodeResult[] Scan(InputStream imageStream);
// Scan and detect EAN13 only from a local image file path.
public static BarcodeResult[] Scan(String filename, BarCodeType barType);
// Read and scan EAN13 only from BufferedImage object.
public static BarcodeResult[] Scan(BufferedImage image, BarCodeType barType);
// Read and decode EAN13 only from InputStream object.
public static BarcodeResult[] Scan(InputStream imageStream, BarCodeType barType);

EAN-13 Reading Example in Java Application

To have a quick test of the functionality of pqScan EAN-13 Barcode Reader Library for Java, you may directly use the following free Java class sample code in your program. In this example, we use "Scan(String filename, BarCodeType barType)" API and show you how to read EAN-13 barcode from Jpeg image file on a disk.

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

public class ReadEAN13Demo
    public static void main(String[] args)
            // Select EAN13 as target barcode symbol and decode it from Jpg image file.
            BarcodeResult[] results = BarcodeScanner.Scan("C:/sample.jpg", BarCodeType.EAN13);

            for(int i = 0; i < results.length; i++)
                // Show all recognized EAN13 data information
                System.out.println(results[i].getData() + "--" + results[i].getBarType());
        catch (Exception e)
pqScan SDK
Barcode Decoder Lib for Java
Online Guide
Scan 1D & 2D Barcodes in Java
Barcode Type
Recognize QR Code for Java Recognize Data Matrix for Java Recognize PDF-417 for Java Recognize Aztec Code for Java Recognize EAN-13 for Java Recognize EAN-8 for Java Recognize UPC-A for Java Recognize UPC-E for Java Recognize Code 128 for Java Recognize Code 39 for Java Recognize Code 93 for Java Recognize Codabar for Java Recognize ITF-14 for Java View All Barcodes >>
I tried several barcode reader toolkit and I believe that the APIs of your SDK is the most mature that Ií»ve encountered so far. Ití»s a pleasant experience of using your product. Andrew Reyes