I have switched things around in the
layout, just a bit, with the same results.
I have tried the following with a trial of XEP, and the proper page
master is selected. I know this is a bug with FOP, and I would
like to contribute a patch. Can
someone give me a jump start point me to the code that makes a page master
decision? <fo:layout-master-set> <!-- layout for the first page --> <fo:simple-page-master master-name="first-page-out-of-many" margin-right="0.5cm" margin-left=".5cm" margin-bottom="0.5cm" margin-top="0.75cm" page-width="21cm" page-height="29.7cm"> <fo:region-body margin-top="7cm"/> <fo:region-before extent="7cm" region-name="header-first"/> <fo:region-after extent="2cm"/> </fo:simple-page-master> <!-- layout for the other pages --> <fo:simple-page-master master-name="page-that-is-neither-first-nor-last" margin-right="0.5cm" margin-left=".5cm" margin-bottom="0.5cm" margin-top="0.75cm" page-width="21cm" page-height="29.7cm"> <fo:region-body margin-right="12.5cm" margin-top="1cm"/> <fo:region-before extent="1cm" region-name="header-rest"/> <fo:region-after extent="2cm"/> </fo:simple-page-master> <fo:simple-page-master master-name="last-page-out-of-many" margin-right="0.5cm" margin-left=".5cm" margin-bottom="0.5cm" margin-top="0.75cm" page-width="21cm" page-height="29.7cm"> <fo:region-body margin-right="12.5cm" margin-top="1cm" margin-bottom="6cm"/> <fo:region-before extent="1cm" region-name="header-rest"/> <fo:region-after extent="6cm" region-name="footer-last"/> </fo:simple-page-master> <fo:simple-page-master master-name="the-only-page" margin-right="0.5cm" margin-left=".5cm" margin-bottom="0.5cm" margin-top="0.75cm" page-width="21cm" page-height="29.7cm"> <fo:region-body margin-top="7cm"/> <fo:region-before extent="7cm" region-name="header-first"/> <fo:region-after extent="6cm" region-name="footer-last"/> </fo:simple-page-master> <fo:page-sequence-master master-name="psmA"> <!-- Sequence for single-page
documents --> <fo:repeatable-page-master-alternatives maximum-repeats="1"> <fo:conditional-page-master-reference page-position="last" master-reference="the-only-page"/> </fo:repeatable-page-master-alternatives> <!-- Sequence for multi-page
documents --> <fo:repeatable-page-master-alternatives> <fo:conditional-page-master-reference page-position="first" master-reference="first-page-out-of-many"/> <fo:conditional-page-master-reference page-position="last" master-reference="last-page-out-of-many"/> <fo:conditional-page-master-reference master-reference="page-that-is-neither-first-nor-last"/> </fo:repeatable-page-master-alternatives> </fo:page-sequence-master> </fo:layout-master-set> -Kevin Ross -----Original Message----- My goal is to have: 1. first page
master 2. rest page
master 3. last page
master Regardless of the attributes on the
conditional-page-master-reference(s), the 2nd entry is always
executed for the pages that are not the first. Use case: 1. conditional-page-master-reference
page-position=”last” follows “first”. The third entry is
“rest”. Only
“first” and “last” page masters are used. First page is correct, but all other
pages are using the “last” page master. The “rest” is left out. Clearly, p2, p3 is not the
“last” page when there are 4 pages. 2. conditional-page-master-reference
page-position=”rest” follows “first”. The third entry is
“last”. Only
“first” and “rest” page masters are used. First page is correct, but all other pages
are using the “rest” page master. Am I doing something wrong here such
as incorrect specification of attributes? Thanks in advance, Kevin Ross |
- conditional-page-master-reference only works with 2 options... Kevin Ross
- Re: conditional-page-master-reference only works with ... Kevin Ross
- Re: conditional-page-master-reference only works with ... Oleg Tkachenko
- RE: conditional-page-master-reference only works w... Kevin Ross
- Re: conditional-page-master-reference only wor... Oleg Tkachenko