BarCode Image Generator in Java

How to create a barcode image in Java? I need something that will allow me to enter a number and create an appropriate barcode image. Is a free library available for this type of task?

+50
java generator barcode
Nov 09 '09 at 12:07
source share
5 answers

iText is a great Java PDF library. They also have an API for creating barcodes. You do not need to create a PDF file to use it.

This page contains information on creating barcodes . Here is an example from this site:

BarcodeEAN codeEAN = new BarcodeEAN(); codeEAN.setCodeType(codeEAN.EAN13); codeEAN.setCode("9780201615883"); Image imageEAN = codeEAN.createImageWithBarcode(cb, null, null); 

The most important thing you need to determine is what type of barcode you need. There are many different barcode formats, and iText supports many of them. You will need to know what format you need before you can determine if this API will work for you.

+37
Nov 09 '09 at 12:11
source share

There is also this free API that you can use to create free barcodes in java.

Barbecue

+17
Nov 09 '09 at 12:13
source share

There is a free library called barcode4j

+15
Nov 09 '09 at 12:11
source share

ZXing is a free, open source Java library for reading and generating barcode images. You need to get the source code and build the jars yourself. Here's a simple tutorial that I wrote to create with ZXing banners and write your first program with ZXing.

[ http://www.vineetmanohar.com/2010/09/java-barcode-api/]

+10
Sep 27 '10 at 17:05
source share

I use barbeque , this is great, and it supports a very wide range of different barcode formats.
See if you want its API .

API Example:

  public static Barcode createCode128 (java.lang.String data)
                              throws BarcodeException 

Creates a Code 128 barcode that dynamically switches between set characters to give as little coding as possible. This will encode all numeric characters, upper and lower alphabetic characters and control characters from the standard ASCII character set. The size of the barcode created will be the smallest possible for the data, and using this “optimal” encoding will give smaller barcodes than any of the other 3 “vanilla” encodings.

+8
Nov 09 '09 at 12:21
source share



All Articles