Line break Issue.

Hi,
 
I am finally at the end of finishing my first xsl-fo generated pdf
report using fop-0.20.4. The xml I generate has tags which are populated
by text from html <textarea> tags. These textarea texts preserve all the
spaces and the newline charcters.
 
I now want to display this information in pdf as:
 
Item description: 
1. This is a new item. 
2. It is on sale now
3. This item can be used for multipurpose jobs such as gardening, lawn
mowing, tree cutting, tree decorating and other purposes
4. It has a 30 day warranty
 
OR AS
 
Item description: 
This is a new item. It is on sale now. This item can be used for
multipurpose jobs such as gardening, lawn mowing .......
 
Depending on how the user has entered it into the HTML form.
 
I have used <fo:block> and <fo:inline>. I cannot use the
linefeed-treatment and the white-space-treatment as they are not yet
implemented. <When I use the white-space-collapse="false"> I get the
data as I need but the whole <fo:block> is marginally shifted right from
the data in region-before content. Also wrap around text such as in
description #3 do not appear correctly. The second line starts
marginally on the left side (is actually aligned with the region-before)
text. I want every line on the pdf to be left aligned.
 
Here is the xsl:
 
<fo:page-sequence master-reference="firstAndRest">
  
    <fo:static-content flow-name="header-first">
      <fo:block>
        <xsl:call-template name="ProgessNoteHeaderFirst"/>
      </fo:block>
    </fo:static-content>
    
  <fo:static-content flow-name="header-rest">
    <fo:block>
      <xsl:call-template name="ProgessNoteHeaderRest"/>
    </fo:block>
  </fo:static-content>
 
    <fo:static-content flow-name="xsl-region-after">
      <fo:block text-align="center">
        <fo:page-number/>
      </fo:block>
    </fo:static-content>
    
    <fo:flow flow-name="xsl-region-body">
      <fo:block>
        <xsl:call-template name="ProgressNoteBody"/>
      </fo:block>
    </fo:flow>
        
  </fo:page-sequence>
 
 
<xsl:template name="ProgressNoteBody">
<xsl:variable name="a" select="Note_12"/>  <!-to display if only the xml
tag has some data -->
<xsl:if test="string-length($a) != 0 ">
<fo:block font-family="Times" font-size="11pt"> <!-to adda blank line
-->
  <fo:inline &#160;</fo:inline>
</fo:block>
<fo:block text-align="start" font-family="Times" font-size="11pt"
white-space-collapse="false">
  <fo:inline font-weight="bold">
    CHIEF COMPLAINT:
  </fo:inline>
  <fo:inline text-align="start">
    <xsl:text>&#160;&#160;</xsl:text>
    <xsl:apply-templates select="Note_12"/>
  </fo:inline>
</fo:block>
</xsl:if>
</xsl:template>
 
Can anybody please help me out with this formatting structure.
 
Thanks,
 
jigs

Received on Thursday, 5 June 2003 17:50:38 UTC