# Business Refinery Barcode Reader for Java

Contents

- Introduction
- Installation
- Requirements
- Linear (1D)
- PDF417
- Data Matrix

Introduction

Business Refinery Barcode Reader for Java is a Java package that can read 1D and 2D barcode image. It can be used in

- Java Application
- Java Web Application (Servlet and JSP)

Product Package Overview

- Linear

  - Code 39 | - Extended Code 39 | - Code 128 | - EAN128
  - UPCA | - UPCE | - EAN-8 | - EAN-13
  - Interleaved 25 |  |  |

- PDF417 - PDF417 and Macro PDF417.

- Data Matrix

Installation

Put BarcodeReader.jar into classpath.

Requirements

Java 1.5 or above.

Linear (1D)

Read barcode from linear image is a simple task.

Here is the sample code.

    82           LinearReader reader=new LinearReader();
    83           reader.setBarcodeType(type);
    84
    85           BarcodeImage barcodeImage =new BarcodeImage((BufferedImage)loadImage(dir+file));
    86
    87           LinearData[] barcodes=reader.read(barcodeImage);

- Create a LinearReader object. (line 82)
- Set linear barcode type. (line 83)
- Load barcode image into BarcodeImage object. (line 85)
- Call read method to get the data. (line 87)

Comple source code is under test-src folder.

PDF417

Here is the sample code to read data from PDF417 image.

    55           PDF417Reader reader=new PDF417Reader();
    56
    57           BarcodeImage barcodeImage =new BarcodeImage((BufferedImage) loadImage(dir+file));
    58
    59           PDF417Data[] barcodes=reader.read(barcodeImage);

- Create a PDF417Reader object. (line 55)
- Load barcode image into BarcodeImage object. (line 57)
- Call read method to get the data. (line 59)

Comple source code is under test-src folder.

Data Matrix

Here is the sample code to read data from data matrix image.

    67           DataMatrixReader reader=new DataMatrixReader();
    68
    69           BarcodeImage barcodeImage =new BarcodeImage((BufferedImage)loadImage(dir+file));
    70
    71           DataMatrixData[] barcodes=reader.read(barcodeImage);

- Create a DataMatrixReader object. (line 67)
- Load barcode image into BarcodeImage object. (line 69)
- Call read method to get the data. (line 71)

Comple source code is under test-src folder.