- From: ollie.petch <oliver.petch@rdfgroup.com>
- Date: Tue, 25 Aug 2009 09:01:19 -0700 (PDT)
- To: www-xsl-fo@w3.org
I'm using Apache FOP in a Java application to generate invoices, I want a
footer displayed only on the final page of the invoice. Sometimes the
invoices will span across multiple pages other times they will fill just a
single page. After googeling extensively I have come up with the following:
<fo:layout-master-set>
<fo:simple-page-master master-name="normal" >
<fo:region-body />
<fo:region-before />
</fo:simple-page-master>
<fo:simple-page-master master-name="last">
<fo:region-body />
<fo:region-before />
<fo:region-after region-name="footer" />
</fo:simple-page-master>
<fo:page-sequence-master master-name="document">
<!-- Single Page Layout -->
<fo:repeatable-page-master-alternatives maximum-repeats="1">
<fo:conditional-page-master-reference master-reference="last"
page-position="first" />
</fo:repeatable-page-master-alternatives>
<!-- Multi Page Layout -->
<fo:repeatable-page-master-alternatives maximum-repeats="no-limit">
<fo:conditional-page-master-reference master-reference="normal"
page-position="first" />
<fo:conditional-page-master-reference master-reference="last"
page-position="last" />
<fo:conditional-page-master-reference master-reference="normal"
page-position="rest" />
</fo:repeatable-page-master-alternatives>
</fo:page-sequence-master>
</fo:layout-master-set>
>From my understanding of what I have read online because I have set
maximum-repeats to 1 on the first subsequence it will be ignored for all
documents with more than one page, therefore the next subsequence with
maximum-repeats set to no-limit will be used. However with this setup I get
the footers on the first page and the last page, but not on pages
in-between. Is there something I am overlooking, to me it seems as though
the maximum-repeats attribute is being ignored.
Any help would be appreciated,
Thanks
Ollie.
--
View this message in context: http://www.nabble.com/Differing-layouts-with-single-and-multi-page-documents-tp25137247p25137247.html
Sent from the w3.org - www-xsl-fo mailing list archive at Nabble.com.
Received on Tuesday, 25 August 2009 16:15:46 UTC