You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Thierry Gounelle <th...@cgey.com> on 2001/12/07 10:56:17 UTC

Specific footer on the last page

Hi everybody,
Here is my problem:
I have a document that may have 1 to N pages. I would like to print
something on the footer of the last page (or at least on the bottom).
But, if there is only one page, the last page is also the first.
I tried something like:

<fo:layout-master-set>
 <!-- layout for "normal" pages -->
 <fo:simple-page-master master-name="ordinary"
   <fo:region-body margin-top=".2cm"/>
   <fo:region-after region-name="ordinary_footer" extent="0cm"/>
 </fo:simple-page-master>

 <!-- layout information for the last page which contains a special
footer -->
 <fo:simple-page-master master-name="last_page"
   <fo:region-body margin-bottom="9.5cm"/>
   <fo:region-after region-name="last_page_footer" extent="9.5cm"/>
 </fo:simple-page-master>

 <fo:page-sequence-master master-name="contents">
   <fo:repeatable-page-master-alternatives>
     <fo:conditional-page-master-reference page-position="last"
master-name="last_page"/>
     <fo:conditional-page-master-reference page-position="first"
master-name="ordinary"/>
     <fo:conditional-page-master-reference page-position="rest"
master-name="ordinary" />
   </fo:repeatable-page-master-alternatives>
 </fo:page-sequence-master >
</fo:layout-master-set>


It doesnt work: I made several tests but it looks like I have the footer
on every page instead of the last one only.
For the last page footer, I'm using a static-content with the flow-name
set to the region-name defined in the layout.
Actually the footer is printed on every page, as if only
page-position="last" is invoqued.
Do I miss something in the use of fo:conditional-page-master-reference?

Thanx a billion,
Thierry


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org