Jump to content

Font not aligning properly in pdf


amarnath.iiitb

Recommended Posts

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>[/code]

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.

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...