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

The property keep-together.within-page='always' implies keep-together.within-column='always' (there should be a difference)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.3
    • None
    • layout/page
    • None

    Description

      This is an example: A document having two columns and as series of small sections, called steps. Each of the "step" block has the attributes:

       keep-together.within-column="auto"
       keep-together.within-page="always"
      

      The "step" at the end of the first column should break on the two columns, as it has keep-together.within-column="auto". Instead it moves completely to the second column.

      In fact it behaves as the column breaks and page breaks are considered by FOP to be the same thing.

      <?xml version="1.0" encoding="UTF-8"?>
      <fo:root
        xml:lang="dflt"
        xmlns:chfox="http://www.oxygenxml.com/chemistry/extensions/fop"
        xmlns:css="http://www.w3.org/1998/CSS"
        xmlns:fo="http://www.w3.org/1999/XSL/Format"
        xmlns:fox="http://xmlgraphics.apache.org/fop/extensions">
        <fo:layout-master-set>
          <!-- Page: csdefault-->
          <fo:page-sequence-master
            master-name="csdefault">
            <fo:repeatable-page-master-alternatives>
              <fo:conditional-page-master-reference
                blank-or-not-blank="any"
                master-reference="spm-csdefault"
                odd-or-even="any"
                page-position="any"/>
            </fo:repeatable-page-master-alternatives>
          </fo:page-sequence-master>
          <fo:simple-page-master
            master-name="spm-csdefault"
            page-height="11in"
            page-width="8.5in">
            <fo:region-body
              border-bottom-color="red"
              border-bottom-style="solid"
              border-bottom-width="2pt"
              border-left-color="red"
              border-left-style="solid"
              border-left-width="2pt"
              border-right-color="red"
              border-right-style="solid"
              border-right-width="2pt"
              border-top-color="red"
              border-top-style="solid"
              border-top-width="2pt"
              column-count="2"
              margin-bottom="1in"
              margin-left="1in"
              margin-right="1in"
              margin-top="1in"/>
            <fo:region-before
              extent="1in"
              region-name="sc-before"/>
            <fo:region-after
              extent="1in"
              region-name="sc-after"/>
            <fo:region-start
              extent="1in"
              region-name="sc-start"/>
            <fo:region-end
              extent="1in"
              region-name="sc-end"/>
          </fo:simple-page-master>
        </fo:layout-master-set>
       
        <fo:page-sequence
          force-page-count="no-force"
          id="last-page-sequence"
          line-height-shift-adjustment="disregard-shifts"
          master-reference="csdefault">
          <fo:flow
            flow-name="xsl-region-body">
            <fo:block
              font-family="DEFAULT_SERIF_FONT"
              font-size="2em">
              <fo:block
                font-style="italic">The step should not break on two pages, but should break on two
                columns . </fo:block>
              <fo:block-container
                border-bottom-color="blue"
                border-bottom-style="solid"
                border-bottom-width="1pt"
                border-left-color="blue"
                border-left-style="solid"
                border-left-width="1pt"
                border-right-color="blue"
                border-right-style="solid"
                border-right-width="1pt"
                border-top-color="blue"
                border-top-style="solid"
                border-top-width="1pt"
                keep-together.within-column="auto"
                keep-together.within-page="always"
                margin-left="0"
                margin-right="0">
                <fo:block
                  end-indent="0"
                  start-indent="0"> This is a step with some text content that should wrap somehow on
                  multiple lines. </fo:block>
              </fo:block-container>
              <fo:block-container
                border-bottom-color="blue"
                border-bottom-style="solid"
                border-bottom-width="1pt"
                border-left-color="blue"
                border-left-style="solid"
                border-left-width="1pt"
                border-right-color="blue"
                border-right-style="solid"
                border-right-width="1pt"
                border-top-color="blue"
                border-top-style="solid"
                border-top-width="1pt"
                keep-together.within-column="auto"
                keep-together.within-page="always"
                margin-left="0"
                margin-right="0">
                <fo:block
                  end-indent="0"
                  start-indent="0"> This is a step with some text content that should wrap somehow on
                  multiple lines. </fo:block>
              </fo:block-container>
              <fo:block-container
                border-bottom-color="blue"
                border-bottom-style="solid"
                border-bottom-width="1pt"
                border-left-color="blue"
                border-left-style="solid"
                border-left-width="1pt"
                border-right-color="blue"
                border-right-style="solid"
                border-right-width="1pt"
                border-top-color="blue"
                border-top-style="solid"
                border-top-width="1pt"
                keep-together.within-column="auto"
                keep-together.within-page="always"
                margin-left="0"
                margin-right="0">
                <fo:block
                  end-indent="0"
                  start-indent="0"> This is a step with some text content that should wrap somehow on
                  multiple lines. </fo:block>
              </fo:block-container>
              <fo:block-container
                border-bottom-color="blue"
                border-bottom-style="solid"
                border-bottom-width="1pt"
                border-left-color="blue"
                border-left-style="solid"
                border-left-width="1pt"
                border-right-color="blue"
                border-right-style="solid"
                border-right-width="1pt"
                border-top-color="blue"
                border-top-style="solid"
                border-top-width="1pt"
                keep-together.within-column="auto"
                keep-together.within-page="always"
                margin-left="0"
                margin-right="0">
                <fo:block
                  end-indent="0"
                  start-indent="0"> This is a step with some text content that should wrap somehow on
                  multiple lines. </fo:block>
              </fo:block-container>
              <fo:block-container
                border-bottom-color="blue"
                border-bottom-style="solid"
                border-bottom-width="1pt"
                border-left-color="blue"
                border-left-style="solid"
                border-left-width="1pt"
                border-right-color="blue"
                border-right-style="solid"
                border-right-width="1pt"
                border-top-color="blue"
                border-top-style="solid"
                border-top-width="1pt"
                keep-together.within-column="auto"
                keep-together.within-page="always"
                margin-left="0"
                margin-right="0">
                <fo:block
                  end-indent="0"
                  start-indent="0"> This is a step with some text content that should wrap somehow on
                  multiple lines. </fo:block>
              </fo:block-container>
              <fo:block-container
                border-bottom-color="blue"
                border-bottom-style="solid"
                border-bottom-width="1pt"
                border-left-color="blue"
                border-left-style="solid"
                border-left-width="1pt"
                border-right-color="blue"
                border-right-style="solid"
                border-right-width="1pt"
                border-top-color="blue"
                border-top-style="solid"
                border-top-width="1pt"
                keep-together.within-column="auto"
                keep-together.within-page="always"
                margin-left="0"
                margin-right="0">
                <fo:block
                  end-indent="0"
                  start-indent="0"> This is a step with some text content that should wrap somehow on
                  multiple lines. </fo:block>
              </fo:block-container>
              <fo:block-container
                border-bottom-color="blue"
                border-bottom-style="solid"
                border-bottom-width="1pt"
                border-left-color="blue"
                border-left-style="solid"
                border-left-width="1pt"
                border-right-color="blue"
                border-right-style="solid"
                border-right-width="1pt"
                border-top-color="blue"
                border-top-style="solid"
                border-top-width="1pt"
                keep-together.within-column="auto"
                keep-together.within-page="always"
                margin-left="0"
                margin-right="0">
                <fo:block
                  end-indent="0"
                  start-indent="0"> This is a step with some text content that should wrap somehow on
                  multiple lines. </fo:block>
              </fo:block-container>
              <fo:block-container
                border-bottom-color="blue"
                border-bottom-style="solid"
                border-bottom-width="1pt"
                border-left-color="blue"
                border-left-style="solid"
                border-left-width="1pt"
                border-right-color="blue"
                border-right-style="solid"
                border-right-width="1pt"
                border-top-color="blue"
                border-top-style="solid"
                border-top-width="1pt"
                keep-together.within-column="auto"
                keep-together.within-page="always"
                margin-left="0"
                margin-right="0">
                <fo:block
                  end-indent="0"
                  start-indent="0"> This is a step with some text content that should wrap somehow on
                  multiple lines. </fo:block>
              </fo:block-container>
              <fo:block-container
                border-bottom-color="blue"
                border-bottom-style="solid"
                border-bottom-width="1pt"
                border-left-color="blue"
                border-left-style="solid"
                border-left-width="1pt"
                border-right-color="blue"
                border-right-style="solid"
                border-right-width="1pt"
                border-top-color="blue"
                border-top-style="solid"
                border-top-width="1pt"
                keep-together.within-column="auto"
                keep-together.within-page="always"
                margin-left="0"
                margin-right="0">
                <fo:block
                  end-indent="0"
                  start-indent="0"> This is a step with some text content that should wrap somehow on
                  multiple lines. </fo:block>
              </fo:block-container>
              <fo:block-container
                border-bottom-color="blue"
                border-bottom-style="solid"
                border-bottom-width="1pt"
                border-left-color="blue"
                border-left-style="solid"
                border-left-width="1pt"
                border-right-color="blue"
                border-right-style="solid"
                border-right-width="1pt"
                border-top-color="blue"
                border-top-style="solid"
                border-top-width="1pt"
                keep-together.within-column="auto"
                keep-together.within-page="always"
                margin-left="0"
                margin-right="0">
                <fo:block
                  end-indent="0"
                  start-indent="0"> This is a step with some text content that should wrap somehow on
                  multiple lines. </fo:block>
              </fo:block-container>
              <fo:block-container
                border-bottom-color="blue"
                border-bottom-style="solid"
                border-bottom-width="1pt"
                border-left-color="blue"
                border-left-style="solid"
                border-left-width="1pt"
                border-right-color="blue"
                border-right-style="solid"
                border-right-width="1pt"
                border-top-color="blue"
                border-top-style="solid"
                border-top-width="1pt"
                keep-together.within-column="auto"
                keep-together.within-page="always"
                margin-left="0"
                margin-right="0">
                <fo:block
                  end-indent="0"
                  start-indent="0"> This is a step with some text content that should wrap somehow on
                  multiple lines. </fo:block>
              </fo:block-container>
              <fo:block-container
                border-bottom-color="blue"
                border-bottom-style="solid"
                border-bottom-width="1pt"
                border-left-color="blue"
                border-left-style="solid"
                border-left-width="1pt"
                border-right-color="blue"
                border-right-style="solid"
                border-right-width="1pt"
                border-top-color="blue"
                border-top-style="solid"
                border-top-width="1pt"
                keep-together.within-column="auto"
                keep-together.within-page="always"
                margin-left="0"
                margin-right="0">
                <fo:block
                  end-indent="0"
                  start-indent="0"> This is a step with some text content that should wrap somehow on
                  multiple lines. </fo:block>
              </fo:block-container>
            </fo:block>
          </fo:flow>
        </fo:page-sequence>
      </fo:root>
      
      
      
      
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            dc33 Dan Caprioara
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: