SourceForge Project Page

Barcode4J examples

The directory examples/ in the distribution contains some example files that show what Barcode4J can do.

Example PDF

The directory examples/xsl-fo/ contains an XML file with barcode instructions (barcodes.xml) and an associated stylesheet (barcodes2xsl-fo.xsl) that converts the XML file to XSL-FO.

The resulting PDF generated by Apache FOP: PDF document view (around 102KB)

Example Web Application

The directory examples/webapp/ contains an sample web application that provides an interactive demo for barcode generation with the Barcode Servlet. It is written using JSP. The build generates the web application by default. To play with it just drop the build/barcode4j.war file in your favourite web container.

Preview of all supported barcode symbologies

PNG and SVG versions
Barcode type PNG graphic
Interleaved 2 of 5 Sample Interleaved 2 of 5 barcode (PNG)
ITF-14 Sample ITF-14 (PNG)
Code 39 Sample Code 39 barcode (PNG)
Code 128 Sample Code 128 barcode (PNG)
Codabar Sample Codabar barcode (PNG)
UPC-A Sample UPC-A barcode (PNG)
UPC-E Sample UPC-E barcode (PNG)
EAN-13 Sample EAN-13 barcode (PNG)
EAN-8 Sample EAN-8 barcode (PNG)
POSTNET Sample POSTNET barcode (PNG)
Royal Mail Customer Barcode Sample Royal Mail Customer barcode (PNG)
USPS Intelligent Mail Sample USPS Intelligent Mail barcode (PNG)
PDF417 Sample PDF417 symbol (PNG)
DataMatrix (square) Sample DataMatrix symbol (PNG)
DataMatrix (rectangular) Sample DataMatrix symbol (PNG)
QR Code Sample QR Code symbol (PNG)

by Jeremias Märki