Loading ...
Sorry, an error occurred while loading the content.

3584Line break Issue.

Expand Messages
  • Jignesh Shah
    Jun 5, 2003

      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">
      <xsl:call-template name="ProgessNoteHeaderFirst"/>

      <fo:static-content flow-name="header-rest">
      <xsl:call-template name="ProgessNoteHeaderRest"/>

      <fo:static-content flow-name="xsl-region-after">
      <fo:block text-align="center">

      <fo:flow flow-name="xsl-region-body">
      <xsl:call-template name="ProgressNoteBody"/>


      <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  </fo:inline>
      <fo:block text-align="start" font-family="Times" font-size="11pt"
      <fo:inline font-weight="bold">
      <fo:inline text-align="start">
      <xsl:text>  </xsl:text>
      <xsl:apply-templates select="Note_12"/>

      Can anybody please help me out with this formatting structure.



      [Non-text portions of this message have been removed]