Uploaded image for project: 'FOP'
  1. FOP
  2. FOP-2582

keep-together.page=<integer> doesn't appear to have an effect

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.1
    • None
    • fo/block
    • None
    • Java 64-bit 1.8.0_66 on MacOS X 10.11.3

    Description

      When trying to keep the contents of a block together on one page, I create a block with:

      <fo:block keep-together.within-page="100"> ... </fo:block>

      This does not seem to have any effect; it is as if the keep-together parameter is still set to "auto".

      To reproduce:

      Process the attached file, keep-bug.xml. E.g. "fop keep-bug.xml keep-bug.pdf"

      Actual result:

      "Section 2" of the example content does not start on a new page; instead a page break appears in the middle of section 2, violating the keep-together attribute.

      Expected result:

      A page break should have been inserted between "section 1" and "section 2" so that "section 2" stays together on a page. This expected result can be demonstrated by changing the keep-together attribute to "always", which demonstrates that it is possible to fit "section 2" on a single page and therefore the integer keep-together constraint should do so.

      Attachments

        1. keep-bug.pdf
          6 kB
          Matthew Wilson
        2. keep-bug.xml
          2 kB
          Matthew Wilson
        3. keep-expected-result.pdf
          6 kB
          Matthew Wilson

        Activity

          People

            Unassigned Unassigned
            mrwilson Matthew Wilson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: