Aspose.BarCode  for Java

Java Barcode Generation & Recognition API

Generate, customize & recognize linear, 2D & postal barcodes within your Java application.

  Download Free Trial

Aspose.BarCode for Java is a robust and reliable API providing the barcode generation and recognition features for Java applications. It supports the most established standards and specifications and allows to read 1D and 2D barcodes from different format images at multiple angles.

Aspose.BarCode for Java renders the labels in a verity of image formats with highly flexible imaging options. Moreover, the library provides printing as well as encoding and decoding of multiple symbologies.

Advanced Java barcode Library Features

Manipulate Labels in Many Ways

Aspose.BarCode for Java API provides the ability to manipulate image borders, style, margin, and width as well as image's background color and bar color. You can also rotate images to any angle and produce high-quality bar code images with anti-aliasing. In addition to this, image margins & resolution can be customized.

Recognize Barcodes from Images

Java barcode library is capable of reading from different images. BarCodeReader class which is mainly responsible for the recognition feature supports many popular image formats including BMP, PNG, TIFF, JPEG & GIF. The recognition process is highly configurable allowing you to set expected regions to find code labels on an image, apply manual recognition hints to optimize the scan & apply binarization filters on the image.

Read barcode type & text from image - Java

// initialize reader with image & expected type

BarCodeReader reader = new BarCodeReader(dir + "bcode.png", DecodeType.ALL_SUPPORTED_TYPES);

// read code

while ( {

	// print the code type & text

	System.out.println("Type: " + reader.getCodeType() + " Text: " + reader.getCodeText());


Supported Barcode Symbologies

Aspose.BarCode for Java API offers support for multiple 1D, 2D and postal symbologies having both encode and decode capabilities:

  • EAN-13
  • EAN-8
  • UPC-A
  • UPC-E
  • Interleaved 2 of 5
  • Standard 2 of 5
  • MSI
  • Code-11
  • Codabar
  • EAN-14 (SCC14)
  • SSCC-18
  • ITF-14
  • Matrix 2 of 5
  • PZN
  • Code-128
  • Code-39 Extended
  • Code-39 Standard
  • Code-93 Extended
  • Code-93 Standard
  • IATA 2 of 5
  • OPC
  • GS1 Code-128
  • ISBN
  • ISMN
  • ISSN
  • ITF-6
  • VIN
  • Pharmacode
  • Databar Omni Directional
  • Databar Limited
  • Databar Truncated
  • Databar Expanded
  • Patch Code (Decode only)
  • Supplement (Decode only)

Supported 2D Symbologies

  • PDF417
  • Macro PDF417
  • DataMatrix
  • QR
  • Aztec (Encode only)
  • Italian Post 25
  • GS1 Data Matrix

Supported Postal Symbologies

  • Postnet
  • USPS OneCode
  • Planet
  • Australia Post
  • Deutsche Post Identcode
  • Deutsche Post Leticode
  • Singapore Post
  • Swiss Post Parcel
  • RM4SCC
  • Australian Poste Parcel

Support and Learning Resources