On this page, we present a library of XSL barcode generators developed by the RenderX technical team. These generators are tested to work with RenderX XEP.

Barcodes are simple to represent — black rectangles separated by white spaces, but difficult to generate. Bar and space widths are often computed in a complex manner, and check digits complicate the picture even more. Our approach uses XSLT to implement the computational part, and SVG to draw the image. Using this technique, it becomes possible to integrate barcodes into XSL-based workflows in a natural way. Barcode generation templates can be called directly from within XSL stylesheets, with no need for special barcode fonts or third-party image-drawing software. Compared to other methods of producing bar codes in XSL-FO, this technique has obvious advantages:

Below, you will find XSLT stylesheets for several popular barcode types. Each stylesheet exports a named template that takes a string as input, and creates an SVG image of the barcode that represents that string. Additional parameters specify details of code format and presentation. Resulting SVG images can be used as embedded graphics in XSL-FO, and rendered to PDF/PostScript with RenderX XEP.

All generators except for Australian 4-State Barcode can control common barcode properties:

For Australian 4-State Barcode, visual parameters are strictly defined by specification and therefore need not be parameterized.

More details about stylesheet usage and parameters can be found in the comments inside stylesheets themselves.

Each generator description also features a pair of sample XML/XSL files, and an online demo. To use the demo, enter a valid value string into the form field and click "Barcode It!" button. A PDF file will be returned.

The following barcode types are available: