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

page-position="last" doesn't work for 1 page document

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: 0.92
    • Fix Version/s: None
    • Component/s: layout/unqualified
    • Labels:
      None
    • Environment:
      Operating System: Windows 2000
      Platform: Other
    • External issue ID:
      40798

      Description

      I have two page-masters defined, with one having a different footer than the
      other.

      When this renders to a 2+ page document, the last page gets the last footer
      and the other pages get the other footer.

      When it renders to a 1 page document, I get the "any" page footer, even though
      the the page is the last page....

      I've posted on nabble.com, and gotten replies that it is possibly a bug.

      This is used to create business forms (like an order), so the total number of
      pages is unknown. The last footer is used to display a Sub-Total, Tax and
      Grand Total.

      Snippet of the code:

      <fo:layout-master-set>
      <fo:simple-page-master master-name="default-page"
      page-height="11in"
      page-width="8.50in"
      margin-top="0.25in"
      margin-left="0.25in"
      margin-right="0.25in"
      margin-bottom="0.25in">
      <!-- space needed for header & footer tables -->
      <fo:region-body
      region-name="body"
      margin-top="0in"
      margin-bottom="1.50in"/>
      <fo:region-before region-name="header" extent="10.0in"/> <!-- space needed
      for header table -->
      <fo:region-after region-name="footer" extent="1.50in"/> <!-- space needed
      for footer table -->
      <fo:region-start extent="0.00in"/>
      <fo:region-end extent="0.00in"/>
      </fo:simple-page-master>

      <fo:simple-page-master master-name="last-page"
      page-height="11in"
      page-width="8.50in"
      margin-top="0.25in"
      margin-left="0.25in"
      margin-right="0.25in"
      margin-bottom="0.25in">
      <!-- space needed for header & footer tables -->
      <fo:region-body
      region-name="body"
      margin-top="0in"
      margin-bottom="1.50in"/>
      <fo:region-before region-name="header" extent="10.0in"/> <!-- space needed
      for header table -->
      <fo:region-after region-name="last-footer" extent="1.50in"/> <!-- space
      needed for footer table -->
      <fo:region-start extent="0.00in"/>
      <fo:region-end extent="0.00in"/>
      </fo:simple-page-master>

      <fo:page-sequence-master master-name="all">
      <fo:repeatable-page-master-alternatives>

      <fo:conditional-page-master-reference
      page-position="last" master-reference="last-page"/>

      <fo:conditional-page-master-reference
      page-position="any" master-reference="default-page" />

      </fo:repeatable-page-master-alternatives>
      </fo:page-sequence-master>
      </fo:layout-master-set>

        Attachments

        1. page-position-last-test.fo
          4 kB
          Dave Gerdt
        2. patch_page-position-fix.diff
          3 kB
          Andreas L. Delmelle
        3. bugzilla40798.diff
          15 kB
          Andreas L. Delmelle
        4. bugzilla40798.diff
          28 kB
          Andreas L. Delmelle

          Activity

            People

            • Assignee:
              fop-dev@xmlgraphics.apache.org fop-dev
              Reporter:
              mikev@ci-inc.com Michael V
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: