Barcode component offers the capability to create diverse barcode types with Okapi in both PNG and SVG formats. For browsers lacking SVG support, the component automatically defaults to PNG format.
<dependency>
<groupId>uk.org.okapibarcode</groupId>
<artifactId>okapibarcode</artifactId>
<version>0.4.9</version>
</dependency>
Interleaved 2 of 5 | |
Codabar | |
Code39 | |
Code128 | |
EAN-8 | |
EAN-13 | |
UPC-A (PNG) | |
UPC-E (Vertical) | |
PDF417 | |
DataMatrix | |
Postnet | |
QR |
<div class="card">
<h:panelGrid columns="2" cellpadding="7">
<h:outputText value="Interleaved 2 of 5"/>
<p:barcode value="0123456789" type="int2of5"/>
<h:outputText value="Codabar"/>
<p:barcode value="A123456B" type="codabar"/>
<h:outputText value="Code39"/>
<p:barcode value="0123456789" type="code39"/>
<h:outputText value="Code128"/>
<p:barcode value="0123456789" type="code128"/>
<h:outputText value="EAN-8"/>
<p:barcode value="1234567" type="ean8"/>
<h:outputText value="EAN-13"/>
<p:barcode value="123456789012+12345" type="ean13"/>
<h:outputText value="UPC-A (PNG)"/>
<p:barcode value="01234567895" type="upca" format="png"/>
<h:outputText value="UPC-E (Vertical)"/>
<p:barcode value="0123457" type="upce" orientation="90"/>
<h:outputText value="PDF417"/>
<p:barcode value="0123456789" type="pdf417"/>
<h:outputText value="DataMatrix"/>
<p:barcode value="0123456789" type="datamatrix" magnification="3.0"/>
<h:outputText value="Postnet"/>
<p:barcode value="0123456789" type="postnet" magnification="3.0"/>
<h:outputText value="QR"/>
<p:barcode value="0123456789" type="qr" width="125" height="125"/>
</h:panelGrid>
</div>