I have certain requirement which is to print the 200 characters by picking the value from DB on to a PDF.
The text in the field can be of 0-200 characters. What ever the value which i have i the field i need display that in the PDF. I am using an xsl to format the text and printing the value in the PDF.
The issue over here is when the 200 characters are having some spaces the text is being displayed properly in the PDF. But when i enter a text without any spaces the text is being trimmed. i tried to increase the width of the PDF document but for normal text with spaces there is a lot space being empty and it is not looking good.
In the above image some text is being trimmed.
The below image shows the text with proper spaces.
How can i format the text properly using xsl irrespective of the text length with or without spaces. The text has to be adjusted accordingly to the page width of the PDF.
<fo:table table-layout="fixed">
<fo:table-column column-width="277mm" column-number="1"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell column-number="1">
<fo:block font-size="18pt" font-weight="bold" text-align="left" line-height="23pt">
<xsl:value-of select="//void[@property='additionalDescription']/string/text()"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
The PDF attributes
<fo:simple-page-master master-name="StandardPage" page-height="210mm" page-width="297mm">
<fo:region-body margin-bottom="20mm" margin-top="12mm" margin-left="14mm" margin-right="6mm"/>
<fo:region-before region-name="headerContent" extent="12mm"/>
<fo:region-after region-name="footer" extent="20mm" precedence="true"/>
<fo:region-start region-name="leftBorder" extent="14mm"/>
<fo:region-end region-name="rightBorder" extent="6mm"/>
</fo:simple-page-master>
Increasing the width of the PDF is making PDF look weird by leaving much space as empty towards right hand side.
Can you please let me know how this can be handled in xsl?
thanks Harsha GNS