Thomas Schmidt

overview

Barcode is a barcode package for Java (1.3+). It inherits java.awt.image.BufferedImage and provides a simple API for barcode generation.

In the moment the folowing codes are implemented :

  • Code 128 A
  • Code 39

It is realy easy to extend this package with other barcodes.

usage

HowTo use this package ?



import   de.mdnetwork.graphic.barcode.*;
   
      ....
      
Code code = new Code128A("HELLO");
	 
BarcodeImage codeImage = new BarcodeImage(400,100,
    		         BarcodeImage.TYPE_3BYTE_BGR,
		         code.getCalculatedTree(),4);

      ....

	
The package provides also a simple main method that allows to generate barcode JPEG images from command line:

tseiman@kobold:~ > java -jar Barcode.jar \
HELLO -z 4 -x 400 -y 100 -c CODE128A -f out.jpg
        

The result:

barcode/barcode.jpg

download

Feel free to download ! :-)