Font not aligning properly in pdf

0

I have used jasper 4.0.2 reports to generate a pdf report.

The problem is, it is running fine in Windows environment (development Env) but the same is not running in the Unix env.

I have the following text fields,

<textField isStretchWithOverflow="true" isBlankWhenNull="true">
    <reportElement positionType="Float" stretchType="RelativeToTallestObject"
                   x="154" y="120" width="360" height="20" isPrintWhenDetailOverflows="true"/>
    <textElement>
        <font fontName="SansSerif" size="10" isBold="false" pdfFontName="Helvetica"/>
    </textElement>
    <textFieldExpression class="java.lang.String">
        <![CDATA[($P{Name} != null) ? $P{Name}.concat(" ") : ""]]>
    </textFieldExpression>
</textField>
 
<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true">
    <reportElement positionType="Float" stretchType="RelativeToTallestObject"
                   x="154" y="133" width="360" height="20" isPrintWhenDetailOverflows="true"/>
    <textElement markup="none">
        <font fontName="SansSerif" size="10" isBold="false" pdfFontName="Helvetica"
              isPdfEmbedded="false"/>
        <paragraph rightIndent="2"/>
    </textElement>
    <textFieldExpression class="java.lang.String">
        <![CDATA[($P{address_1} != null) ? $P{address_1}.concat(" ") : ""]]>
    </textFieldExpression>
</textField>
 
<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true">
    <reportElement positionType="Float" stretchType="RelativeToTallestObject"
                   x="154" y="146" width="360" height="20" isPrintWhenDetailOverflows="true"/>
    <textElement markup="none">
        <font fontName="SansSerif" size="10" isBold="false" pdfFontName="Helvetica"
              isPdfEmbedded="false"/>
        <paragraph rightIndent="2"/>
    </textElement>
    <textFieldExpression class="java.lang.String">
        <![CDATA[($P{address_2} != null) ? $P{address_2}.concat(" ") : ""]]>
    </textFieldExpression>
</textField>
 
<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true">
    <reportElement positionType="Float" stretchType="RelativeToTallestObject"
                   x="154" y="160" width="360" height="20" isPrintWhenDetailOverflows="true"/>
    <textElement markup="none">
        <font fontName="SansSerif" size="10" isBold="false" pdfFontName="Helvetica"
              isPdfEmbedded="false"/>
        <paragraph rightIndent="2"/>
    </textElement>
    <textFieldExpression class="java.lang.String">
        <![CDATA[($P{address_3} != null) ? $P{address_3}.concat(" ") : ""]]>
    </textFieldExpression>
</textField>

In the UNIX environment, some of the letters split and come in the next lines where as the same does not happen in Windows.

Can some one tell me the reason such that I can fix the issue.

Attachments: 
amarnath.iiitb's picture
Joined: Sep 10 2013 - 4:25am
Last seen: 6 years 2 months ago

0 Answers:

No answers yet
Feedback
randomness