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

3370Different PDF results from a simple FO file

Expand Messages
  • raymundo2104
    Apr 29, 2003
    • 0 Attachment
      Hi,

      Here is the FO code:

      ================= START OF CODE ======================
      <?xml version="1.0" encoding="utf-8"?>
      <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
      <fo:layout-master-set>
      <fo:simple-page-master
      master-name="spm"
      page-width="31.375cm"
      page-height="22cm">

      <fo:region-before
      region-name="before"
      extent="1.76cm"/>

      <fo:region-after
      region-name="after"
      extent="1.76cm"/>

      <fo:region-start
      region-name="start"
      extent="7.69cm"/>

      <fo:region-end
      region-name="end"
      extent="0cm"/>

      <fo:region-body
      region-name="body"
      margin-top="1.76cm"
      margin-bottom="1.76cm"
      margin-left="7.69cm"
      margin-right="0cm"
      />

      </fo:simple-page-master>
      </fo:layout-master-set>


      <fo:page-sequence master-reference="spm">

      <fo:static-content flow-name="before">
      <fo:block>
      <fo:table table-layout="fixed">
      <fo:table-column column-number="1" column-width="23.685cm"/>
      <fo:table-body>
      <fo:table-row height="1.76cm" display-align="center">
      <fo:table-cell
      border-top-color="black"
      border-top-style="solid"
      border-top-width="0.23cm"
      border-bottom-color="black"
      border-bottom-style="solid"
      border-bottom-width="0.12cm"
      border-left-color="black"
      border-left-style="solid"
      border-left-width="0.12cm"
      border-right-color="black"
      border-right-style="solid"
      border-right-width="0.215cm"
      background-color="yellow"
      >
      <fo:block text-align="center">region-before</fo:block>
      </fo:table-cell>
      </fo:table-row>
      </fo:table-body>
      </fo:table>
      </fo:block>
      </fo:static-content>


      <fo:static-content flow-name="after">
      <fo:block>
      <fo:table table-layout="fixed">
      <fo:table-column column-number="1" column-width="23.685cm"/>
      <fo:table-body>
      <fo:table-row height="1.76cm" display-align="center">
      <fo:table-cell
      border-top-color="black"
      border-top-style="solid"
      border-top-width="0.12cm"
      border-bottom-color="black"
      border-bottom-style="solid"
      border-bottom-width="0.23cm"
      border-left-color="black"
      border-left-style="solid"
      border-left-width="0.12cm"
      border-right-color="black"
      border-right-style="solid"
      border-right-width="0.215cm"
      background-color="yellow"
      >
      <fo:block text-align="center">region-after</fo:block>
      </fo:table-cell>
      </fo:table-row>
      </fo:table-body>
      </fo:table>
      </fo:block>
      </fo:static-content>


      <fo:static-content flow-name="start">
      <fo:block>
      <fo:table table-layout="fixed">
      <fo:table-column column-number="1" column-width="7.69cm"/>
      <fo:table-body>
      <fo:table-row height="22cm" display-align="center">
      <fo:table-cell
      border-top-color="black"
      border-top-style="solid"
      border-top-width="0.23cm"
      border-bottom-color="black"
      border-bottom-style="solid"
      border-bottom-width="0.23cm"
      border-left-color="black"
      border-left-style="solid"
      border-left-width="0.28cm"
      border-right-color="black"
      border-right-style="solid"
      border-right-width="0.14cm"
      background-color="yellow"
      >
      <fo:block text-align="center">region-start</fo:block>
      </fo:table-cell>
      </fo:table-row>
      </fo:table-body>
      </fo:table>
      </fo:block>
      </fo:static-content>


      <fo:flow flow-name="body">
      <fo:block>
      <fo:table table-layout="fixed">
      <fo:table-column column-number="1" column-width="23.685cm" />
      <fo:table-body>
      <fo:table-row height="18.48cm" display-align="center">
      <fo:table-cell
      border-top-color="black"
      border-top-style="solid"
      border-top-width="0.35cm"
      border-bottom-color="black"
      border-bottom-style="solid"
      border-bottom-width="0.35cm"
      border-left-color="black"
      border-left-style="solid"
      border-left-width="0.12cm"
      border-right-color="black"
      border-right-style="solid"
      border-right-width="0.215cm"
      background-color="gray"
      >
      <fo:block text-align="center">region-body</fo:block>
      </fo:table-cell>
      </fo:table-row>
      </fo:table-body>
      </fo:table>
      </fo:block>
      </fo:flow>
      </fo:page-sequence>
      </fo:root>

      =================END OF CODE ======================

      I ran the above code using FOP 0.20.5RC and got the following
      warnings:

      [WARNING] Some static content could not fit in the area
      [WARNING] Some static content could not fit in the area
      [WARNING] Some static content could not fit in the area

      FOP 0.20.5RC created a 2-page PDF file where I expect only 1 page!
      The 2nd page was blank!

      Then I tried XSL Formatter 2.4.2003.312 (eval) and I did not get any
      errors nor warnings and got 1 page and the result I expected.

      Then I tried XEP 3.12 (eval) and I got this message:
      {!no space for an element, trying to recover}

      XEP 3.12 did create a 1-page PDF file but the result is the worst
      amongst the 3 renderers.

      I would appreciate it if anyone could point out to me whether my math
      is wrong: page width and height vs regions' widths and heights and
      regions' border widths) or it is a bug (in FOP 0.20.5RC or XEP 3.12 --
      XSL Formatter did not flag any errors or warnings). This is pretty
      basic, my requirement is far more complicated with background images
      in each regions to be populated with text from XML and graphics
      imported from bitmaps. XSL Formatter turned out the result I
      expected (or at least I wish to see).

      I am surprised at the different PDF files produced. My worry is XSLT
      stylesheet maintenance issue -- updating codes when moving from 1
      renderer to the another.

      Any comments, suggestions, corrections, etc., from the XSL-FO
      community will be very much appreciated.

      Thanks and regards,


      Rico Raymundo
      Senior Applications Developer
      NetImpact Online Publishing
      enrico@...
    • Show all 3 messages in this topic