PrimeFaces barcode example
I just tried to just copy the sample in PrimeFaces Showcase by barcode. Here is this code and I get:
I just wanted to test it, getting the same effect as the sample.
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:pm="http://primefaces.org/mobile"
xmlns:p="http://primefaces.org/ui">
<h:head>
</h:head>
<h:body>
<p:panelGrid columns="2">
<h:outputText value="Postnet" />
<p:barcode value="0123456789" type="postnet"/>
<h:outputText value="QR" />
<p:barcode value="0123456789" type="qr"/>
</p:panelGrid>
</h:body>
+3
source to share
2 answers
Are you adding barcode4j and qrgen library to your dependency?
<dependency>
<groupId>net.glxn</groupId>
<artifactId>qrgen</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>net.sf.barcode4j</groupId>
<artifactId>barcode4j-light</artifactId>
<version>2.1</version>
</dependency>
** barcode4j 2.1 does not exist in the central maven repository, so manual installation is necessary for maven users
+5
source to share
you need to add the jar file to your repository to understand the components to understand the component better. You can get the jar here http://www.barcodelib.com/java_barcode/barcode_symbologies . This is "barcode4j-light version 2.1"
0
source to share