Jasper justified text is stretched out

0

Hi all,

I have following text:

Aaaaaaaa a aaaaaaa aaaaaa aaaaaa a aaaaaa aaaaaaa aaa aa aaaaa aaaaaaaaa aaaa aaaaaaaa aaaaaaaaaaa aa aaa aaaaa aaaaaaaa aaaaa aaa. aa aaaaaaa aaaaaa aaaaaa aaaaaaaa aa aaaaaaa aaaaaa aaaa aaaaaaa, aaaaaa aaaaaaaaaa aaaa:\naaaaa aaaaaaaaaaa aa aaaaaaaa aaaaa aaaaa\t \t \t \t \n                                    31.12.2017   31.12.2018\naaaa aaaaaaa aaaa aa aaa\t 0,0000\t aa  0,0000 aa \naaaa aaaaaaa aaa aa aaa\t 1,1711\t aa  4,0000 aa \naaaa aaaaaa aaaaaaaaa aaaa aaaaaaa aaaaaaaaaaa aaaaa aaaaaaaa aa aaaaaa aaaaa aaaaaa aaaaa a aaaa aaaaaaa

This is converted into PDF document and text is stretched out:

<band height="15" splitType="Stretch">
   <textField isStretchWithOverflow="true">
      <reportElement positionType="Float" stretchType="NoStretch" x="0" y="0" width="490" height="15" uuid="7e24c6a9-5c03-43a5-82ea-151bff88d24a"/>
      <textElement textAlignment="Justified">
         <font fontName="CustomFont" pdfEncoding="Cp1250"/>
      </textElement>
      <textFieldExpression><![CDATA[$F{content}]]></textFieldExpression>
   </textField>
</band>

I would like to have no space between number digits. How to solve this issue? I tried using properties:

<property name="net.sf.jasperreports.export.pdf.justified.letter.spacing" value="false"/>
<property name="net.sf.jasperreports.export.pdf.force.linebreak.policy" value="true"/>

but not help.

Thank you in advance.

falcon-eu's picture
Joined: Mar 21 2019 - 4:02am
Last seen: 6 months 2 weeks ago

2 Answers:

0

I just tested with JasperReports 6.6.0 and 0,000 was shown intact in the pdf. One difference was that I didn't specify any font. Try changing the font and see what happens.

 

hozawa's picture
51038
Joined: Apr 24 2010 - 4:31pm
Last seen: 4 months 1 week ago
0

I removed \t signs and it works correct now but I have annother issue. When text in some lines are short jasper forced the text to be justified and it looks bad in my opinion. How to prevent justify when text in some lines are short? Thank you in advance.

falcon-eu's picture
Joined: Mar 21 2019 - 4:02am
Last seen: 6 months 2 weeks ago
Feedback