Can we somehow determine the position of the last-page in XSL-FO? If I want to place my footer only on the last page, then how it could be done? As Input data varies and is not static. So any number of pages can come depending on the data.
Asked
Active
Viewed 1,644 times
2 Answers
1
Hope, it's not too late. But anyway, for all interested people:
Create a page master
<fo:simple-page-master master-name="my-last-page">...</fo:simple-page-master>
and put your footer as a "region-after" into that master.
Add this to your repeatable-page-master-alternatives
<fo:conditional-page-master-reference page-position="last" master-reference="my-last-page"/>

Florian Ruh
- 110
- 8
-
Because the `fo:conditional-page-master-reference` are tested in sequence (see http://www.w3.org/TR/xsl11/#fo_repeatable-page-master-alternatives), put the one with `page-position="last"` *before* any others that might also be true. I.e., put it before ones testing for odd or even pages, etc. – Tony Graham Jan 10 '16 at 20:04