Fop
  1. Fop
  2. FOP-1106

span property causes random insertion of page breaks

    Details

    • Type: Bug Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: 0.90
    • Fix Version/s: None
    • Component/s: layout/unqualified
    • Labels:
      None
    • Environment:
      Operating System: Windows XP
      Platform: Other
      URL: http://xml.apache.org/fop
    • External issue ID:
      37813

      Description

      If I create three blocks on a page and make the first and third set to
      span="all", a page break will be added. This pattern will continue for as many
      alternating blocks as I include.

      I need to create a heading that SPANS two columns, followed by some text IN
      columns, repeated. It works fine for the first two fo:blocks, but after that it
      begins added page breaks in weird places. Also, this behavior will occur even
      with column-count="1" instead of "2". The problem starts with the second
      <fo:block span="all"> element.

      I tried to fix this by using multiple region-body elements, but it failed. Code
      below...

      <?xml version="1.0" encoding="UTF-8"?>
      <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"
      xmlns:r="http://xmlresume.sourceforge.net/resume/0.0">
      <fo:layout-master-set>
      <fo:simple-page-master page-width="8.5in" page-height="11in"
      master-name="resume-page">
      <fo:region-body column-count="2"/>
      </fo:simple-page-master>
      </fo:layout-master-set>
      <fo:page-sequence master-reference="resume-page">
      <fo:flow flow-name="xsl-region-body" line-height="normal">
      <fo:block span="all">Test Spanned Block</fo:block>
      <fo:block span="none">Test Unspanned Block Test Unspanned Block Test
      Unspanned Block Test Unspanned Block</fo:block>
      <!-- this one causes the error -->
      <fo:block span="all">Test Spanned Block</fo:block>
      <!-- this one doesn't -->
      <!-- <fo:block span="none">Test Spanned Block</fo:block> -->
      </fo:flow>
      </fo:page-sequence>
      </fo:root>
      <!-- Failed Solution
      <?xml version="1.0" encoding="UTF-8"?>
      <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"
      xmlns:r="http://xmlresume.sourceforge.net/resume/0.0">
      <fo:layout-master-set>
      <fo:simple-page-master page-width="8.5in" page-height="11in"
      master-name="resume-page-A">
      <fo:region-body/>
      </fo:simple-page-master>
      <fo:simple-page-master page-width="8.5in" page-height="11in"
      master-name="resume-page-B">
      <fo:region-body column-count="2"/>
      </fo:simple-page-master>
      </fo:layout-master-set>
      <fo:page-sequence master-reference="resume-page-A">
      <fo:flow flow-name="xsl-region-body" line-height="normal">
      <fo:block>Test Spanned Block</fo:block>
      </fo:flow>
      </fo:page-sequence>
      <fo:page-sequence master-reference="resume-page-B">
      <fo:flow flow-name="xsl-region-body" line-height="normal">
      <fo:block>Test Unspanned Block Test Unspanned Block Test Unspanned Block Test
      Unspanned Block</fo:block>
      </fo:flow>
      </fo:page-sequence>
      <fo:page-sequence master-reference="resume-page-A">
      <fo:flow flow-name="xsl-region-body" line-height="normal">
      <fo:block>Test Spanned Block</fo:block>
      </fo:flow>
      </fo:page-sequence>
      </fo:root> -->

        Activity

        No work has yet been logged on this issue.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development