Apache™ Batik extensions for Barcode rendering.
Use following maven coordinates and jitpack.io repository.
<dependency>
<groupId>com.github.dsagomonov</groupId>
<artifactId>batik-barcode-ext</artifactId>
<version>1.1</version>
</dependency>
Use http://xml.apache.org/batik/ext
namespace in your SVG-documents
1-D barcode element
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg"
xmlns:bc="http://xml.apache.org/batik/ext"
height="192px" viewBox="0 0 336 192"
width="336px">
<g>
<bc:barcode x="50" y="30" format="code-128" width="2" height="56"><![CDATA[900000155030]]></bc:barcode>
</g>
</svg>
Attribute name | Description | Default value |
---|---|---|
x | The x coordinate of the barcode-rect | 0 |
y | The y coordinate of the barcode-rect | 0 |
width | The width of barcode line | 1 |
height | The height of the barcode-rect | 20 |
format | Barcode format | - |
Supported formats: