Fop
  1. Fop
  2. FOP-1123

Overflow of output in region-body if there is space-after.optimum

    Details

    • Type: Bug Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: trunk
    • Fix Version/s: None
    • Component/s: page-master/layout
    • Labels:
      None
    • Environment:
      Operating System: All
      Platform: All
    • External issue ID:
      38102

      Description

      I have the following problem in the actual SVN version (2006-01-02):
      I render a FO document and FOP writes text beyond the bottom of the region-body
      area.
      After some testing I found out that this happens, if one ore more <fo:block>'s
      have the space-before.optimum or space-after.optimum attribute. For space-before
      or space-after (without ".optimum") it works fine.
      The space itself occurs right, but it seems that the space isn't added to the
      "space consumed by the page", and then the output overflows the region-body.

      I will attach a sample-fo-file

      Ciao
      Mark

      1. Test.fo
        2 kB
        Mark Plomer

        Activity

        Hide
        Mark Plomer added a comment -

        Attachment Test.fo has been added with description: Shows the overflow

        Show
        Mark Plomer added a comment - Attachment Test.fo has been added with description: Shows the overflow
        Hide
        Jeremias Maerki added a comment -

        Bug fixed: http://svn.apache.org/viewcvs?rev=365928&view=rev

        But this only fixes this particular problem with fo:block. I will need to check
        all the other FOs, too.

        The problem was that BlockLayoutManager did not promote the space adjust value
        to its child layout managers via the LayoutContext. If you specify the
        space-before using only a space-before.optimum, the space may shrink to 0pt if
        necessary (.minimum is 0pt by default). In your example, the page breaker tried
        to make the space smaller to make a better page break decision, but the code
        that generates the areas did not properly respect the breaker's decision.

        Show
        Jeremias Maerki added a comment - Bug fixed: http://svn.apache.org/viewcvs?rev=365928&view=rev But this only fixes this particular problem with fo:block. I will need to check all the other FOs, too. The problem was that BlockLayoutManager did not promote the space adjust value to its child layout managers via the LayoutContext. If you specify the space-before using only a space-before.optimum, the space may shrink to 0pt if necessary (.minimum is 0pt by default). In your example, the page breaker tried to make the space smaller to make a better page break decision, but the code that generates the areas did not properly respect the breaker's decision.
        Hide
        Mark Plomer added a comment -

        Wow ... that was really fast
        I've recompiled FOP from SVN an it works.

        Now I better understand the handling of
        space-after.optimum. The text "This text
        should be on the next page" in the sample
        is of course not correct.

        Thank you.

        Show
        Mark Plomer added a comment - Wow ... that was really fast I've recompiled FOP from SVN an it works. Now I better understand the handling of space-after.optimum. The text "This text should be on the next page" in the sample is of course not correct. Thank you.
        Hide
        Glenn Adams added a comment -

        batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed

        Show
        Glenn Adams added a comment - batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed

          People

          • Assignee:
            fop-dev
            Reporter:
            Mark Plomer
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development