XML technologies / XSL-FO / Reference / Compart XSL extensions / Elements / barcode

(Excerpt from "XSL-FO ― Die Referenz" by Manuel Montero Pineda & Steffen Herkert, 2016, dpunkt.verlag)

A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z

Category: Barcode-spezifisches Formatting object - cpfo:barcode

Description

This element specifies the barcode element with the defined barcode type.

Attributes

cpfo:barcode-dimensions

This attribute defines the number of rows and columns of the barcode, where possible

cpfo:barcode-error-correction-level

This attribute specifies the amount of error correction data with a value in the range 1 .. 100.

cpfo:barcode-format

This attribute specifies the format of the Aztec and QR codes.

cpfo:barcode-layers

This element specifies QR Code versions 1 .. 40 and Aztec layers 1 .. 32.

cpfo:barcode-process-escape-sequences

This attribute specifies the processing of escape sequences for MaxiCode and QR Code.

cpfo:barcode-symbol-mode

This attribute specifies the symbol mode for MaxiCode.

cpfo:barcode-type

This attribute specifies the barcode type.

cpfo:binary-encoding

This attribute specifies the content encoding.

cpfo:check-digits

This attribute specifies the check digits.

cpfo:display-hri

This attribute displays the human-readable interpretation.

cpfo:height

This attribute specifies the height of the barcode.

cpfo:hri-distance

This attribute specifies the space between the barcode and its human-readable interpretation.

cpfo:width

This attribute specifies the width of the barcode.

XSL-FO example:

<fo:root>
<fo:layout-master-set>
<fo:simple-page-master master-name="DinA4" margin="10mm" page-width="100mm" page-height="70mm">
<fo:region-body region-name="xsl-region-body"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="DinA4">
<fo:flow flow-name="xsl-region-body" font-family="Arial" font-size="12pt">
<fo:block font-weight="bold" font-size="20pt" space-after="1cm" border-bottom="0.5pt solid black">
 Code 128 
</fo:block>
<fo:block>
<cpfo:barcode barcode-type="code128" check-digits="1" display-hri="yes" width="5cm" height="32pt">
0123456789
</cpfo:barcode>
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>

Download the examples

In the output:

back to top