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

3375Re: [XSL-FO] Different PDF results from a simple FO file

Expand Messages
  • W. Eliot Kimber
    Apr 30 6:27 AM
    • 0 Attachment
      raymundo2104 wrote:

      >
      > 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 notice two things immediately:

      - you've set the vertical size of the table to be precisely the same as
      the vertical extent of the area. Depending on the details of how the FO
      implementation works, this might lead to problems, as there could be
      subtle things like accounting for border widths.

      - Your use of tables is completely unnecessary (at least with XEP and
      XSL Formatter). You can get the same effect with a simple block
      container, e.g.:

      <fo:static-content>
      <fo:block-container
      block-progression-dimension="100%"
      inline-progression-dimension="100%"
      display-align="center"
      text-align="center"
      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>region before</fo:block>
      </fo:block-container>
      </fo:static-content>

      By using percentages for the dimensions of the blocks you also avoid any
      overflow conditions.

      Also, your specification of zero-width region-end and corresponding body
      region margin is unnecessary--an unspecified region has no extent
      (because it doesn't exist).

      BTW, as a rule XEP will provide the best error reporting of any of the
      FO implementations, while XSL Formatter is the most forgiving and does
      not claim to be a validating FO processor. For that reason, even when
      I'm using XSL Formatter for my final rendering, I like to use XEP to
      validate my FO instances.

      Cheers,

      E.
      --
      W. Eliot Kimber, eliot@...
      Consultant, ISOGEN International

      1016 La Posada Dr., Suite 240
      Austin, TX 78752 Phone: 512.656.4139
    • Show all 3 messages in this topic