• Settings
    • Locale
    • Change the locale of the datepicker, schedule and client side validation messages.

      Language
      English
      English
      English
      French
      German
      German
      German
      Italian
      Korean
      Spanish
      Catalan
      Dutch
      Portuguese
      Portuguese
      Arabic
      Arabic
      Bulgarian
      Bangla
      Bosnian
      Czech
      Greek
      Estonian
      Persian
      Finnish
      Danish
      Hindi
      Indonesian
      Icelandic
      Croatian
      Japanese
      Hungarian
      Hebrew
      Georgian
      Central Kurdish
      Khmer
      Kyrgyz
      Kazakh
      Lithuanian
      Latvian
      Malay
      Norwegian
      Polish
      Romanian
      Russian
      Slovak
      Slovenian
      Serbian
      Serbian
      Swedish
      Thai
      Turkish
      Ukrainian
      Uzbek
      Vietnamese
      Chinese
      Chinese
  • Resources

Barcode

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.5.0</version>
            </dependency>
            

Barcode Tag Documentation

Barcode component is used to display various barcode formats QR Code, Code 128, Code 39, EAN-13, UPC-A, ITF-14, and DataMatrix.

NameTypeRequiredDefaultDescription
id String false generated Unique identifier of the component in a namingContainer.
rendered boolean false true Boolean value to specify the rendering of the component, when set to false component will not be rendered.
binding UIComponent false generated An EL expression referring to a server side UIComponent instance in a backing bean.
alt String false
cache boolean false true Controls browser caching mode of the resources.
dir String false Direction indication for text that does not inherit directionality.
format String false svg Format of the generated barcode, valid values are "svg" and "png".
height String false Specifies the height of an element.
hrp String false bottom The barcode human readable placement of text either "none", "top", or "bottom".
ismap boolean false false
lang String false
longdesc String false
magnification double false 2.0 The magnification factor of the barcode.
onclick String false Fires when a mouse click on the element.
ondblclick String false Fires when a mouse double-click on the element.
onkeydown String false Fires when a user is pressing a key.
onkeypress String false Fires when a user presses a key.
onkeyup String false Fires when a user releases a key.
onmousedown String false Fires when a mouse button is pressed down on an element.
onmousemove String false Fires when the mouse pointer is moving while it is over an element.
onmouseout String false Fires when the mouse pointer moves out of an element.
onmouseover String false Fires when the mouse pointer moves onto an element.
onmouseup String false Fires when a mouse button is released over an element.
orientation int false 0 Orientation in terms of angle. (0, 90, 180, 270)
qrErrorCorrection String false L The QR Code error correction level. L - up to 7% damage. M - up to 15% damage. Q - up to 25% damage. H - up to 30% damage
quietZoneHorizontal int false 10 The horizontal quiet zone of the barcode in pixels.
quietZoneVertical int false 1 The vertical quiet zone of the barcode in pixels.
role String false
style String false Specifies an inline CSS style for an element.
styleClass String false Specifies one or more CSS class names for an element.
title String false Specifies extra information about an element (displayed as a tooltip).
type String false Type of the barcode.
usemap String false
value Object false Value of the component.
width String false Specifies the width of an element.
Loading...
Tag DocumentationNew DocumentationNew Documentation
Interleaved 2 of 5
Codabar
Code39
Code128
EAN-8
EAN-13
UPC-A (PNG)
UPC-E (Vertical)
PDF417
DataMatrix
Postnet
QR

Usage


<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="12345670" type="ean8"/>

        <h:outputText value="EAN-13"/>
        <p:barcode value="1234567890128" type="ean13"/>

        <h:outputText value="UPC-A (PNG)"/>
        <p:barcode value="012345678958" type="upca" format="png"/>

        <h:outputText value="UPC-E (Vertical)"/>
        <p:barcode value="0123456" 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>