Thanks Chris. 
I figured that was the case ... was hoping maybe someone else had overcome this 
same problem.

Cheers
Darryl

-----Original Message-----
From: Chris Bowditch <bowditch_ch...@hotmail.com> 
Sent: Wednesday, February 12, 2025 10:54 AM
To: fop-users@xmlgraphics.apache.org
Subject: Re: page-sequence conditional-page-master-reference criteria for last 
odd page

**WARNING: This message originated outside the organization. Do not click on 
links or open attachments you do not trust. / AVERTISSEMENT: Courriel externe. 
Ne cliquez pas sur les liens ou n’ouvrez pas des pièces jointes auxquels vous 
ne faites pas confiance.***


Hi,

When you set force-page-count="end-on-even" the last page will never be odd and 
that's why the page master "last_odd" is never selected. What you are looking 
for is page-position="last-1" but unfortunately FOP doesn't support that

Thanks,

Chris

On 27/01/2025 20:41, Darryl Beallie wrote:
>
> Hi FOP users,
>
> I am having trouble with the page-master layouts used for a page 
> sequence.
>
> The page sequence uses force-page-count="end-on-even". This appears to 
> work as expected, no matter the content, the sequence always ends on 
> an even page, creating a blank if necessary.
>
> My trouble is with the last odd page when is preceding a forced 
> end-on-even page. I want for that preceding last odd page to use a 
> different footer layout.
>
> I have created simple-page-masters for even , odd , blank, and last 
> odd pages.
>
> I have created the page-sequence-master to use 
> repeatable-page-master-alternatives > 
> conditional-page-master-reference as follows
>
> <fo:conditional-page-master-reference master-reference="blank"
> blank-or-not-blank="blank"/>
> <fo:conditional-page-master-reference master-reference="last_odd"
> blank-or-not-blank="not-blank" page-position="last" 
> odd-or-even="odd"/> <fo:conditional-page-master-reference 
> master-reference="even"
> blank-or-not-blank="not-blank" odd-or-even="even"/> 
> <fo:conditional-page-master-reference master-reference="odd”
> blank-or-not-blank="not-blank" odd-or-even="odd"/>
>
> No matter the order of the above conditional-page-master-reference 
> elements, the last_odd never gets selected.
>
> I have verified this by generating  “intermediate-format”  output and 
> see the if:page page-master-name="blank" correctly used for the last 
> page in sequence but the preceding odd page is using if:page 
> page-master-name="odd".
>
> <if:page-squence>
>
> <if:page page-master-name="odd">..</if:page>
>
> <if:page page-master-name="even">..</if:page>
>
> <if:page page-master-name="odd">..</if:page>
>
> <if:page page-master-name="blank">..</if:page>
>
> </if:page-squence>
>
> Am I misunderstanding  how force-page-count="end-on-even" works?  Or 
> do I have my conditional-page-master-ref criteria wrong or ordered 
> incorrectly?  Any help/ideas would be much appreciated.
>
> System details:
>
> Windows 11
>
> Oxygen 26
>
> JRE 17.0.8+7 (From Oxygen installed jre)
>
> Apache FOP 2.9  (From Oxygen installed fop)
>
> Thanks,
>
> Darryl
>


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org

Reply via email to