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.
Chris Dail Nov 09 '09 at 12:11 2009-11-09 12:11
source share