SourceForge Project Page

Design notes


  • The whole barcode package shall be flexible and extensible. New implementations (barcode type or output format) should be easy to add.
  • The design shall be done in a way that different barcode types (1D vs. 2D) can be supported.
  • The barcodes implementations shall be configured using XML and in a way that the whole package can easily be integrated into a bigger work.
  • The barcode logic (checksums, encoding, character sets etc.) shall be separated from the rendering of the barcode so different output formats (SVG, bitmaps etc.) can easily be supported.

Package overview


This package holds the primary interfaces for generating barcodes.

Main interfaces

  • BarcodeGenerator: Main interface for generating barcodes.
  • BarcodeClassResolver: Resolves symbolic names to barcode implementation classes.
  • BarcodeLogicHandler: Receives barcode events (similar to SAX events for XML) generated by barcode logic implementations.

BarcodeUtil is an very useful helper class. Have a look!


This package is the home of the standard barcode implementations. Each implementation consist mostly of two classes, a logic implementation and a presentation implementation. The presentation part calls the logic part to generate something similar to SAX events but for barcodes (See BarcodeLogicHandler).

org.krysalis.barcode4j.output (and subpackages)

This is where the various output formats are implemented. To implement a new coordinate-based output format the main task is to create a new CanvasProvider implementation.

This package contains various helper classes used internally.


This package contains the command-line interface.


This package contains the barcode servlet.


This package contains the XSLT extension for Apache Xalan.


This package contains the XSLT extension for the SAXON XSLT Processor by Michael Kay.


This package contains the playground GUI application. It's used to play around with barcodes. Have fun!

This is work in progress! Help wanted! Be creative!

by Jeremias Märki