metasfresh logo and link to homepage

How to resize a Jasper barcode


  1. Set the desired size for the reportElement, i.e. width and height.
  2. In the reportElement, set the desired properties (i.e. property name) and use “pixel” as value for the size.
  3. In the actual barcode element, set the module ratio, e.g., moduleWidth="1.0".

Code Example

  <reportElement x="455" y="67" width="100" height="30" uuid="32894ab7-c334-4e57-99a1-5362e3830917">
        <property name="" value="pixel"/>
        <property name="" value="pixel"/>
  <jr:Code128 xmlns:jr="" xsi:schemaLocation="" moduleWidth="1.0" textPosition="bottom">

Zur Quelldatei auf