Davide Raschetti wrote:
> I've a different footer for the last page, I have tried with page-sequence-master-reference:
>
>
>
>
>
>
>
>
> but this don't work because every pages are are recognized like 'last pages'.
>
> There is an other way to recognize the last page?
Implementing a last page recognition is more tricky than
most people think, therefore FOP currently does not support
it.
There are several posibilities to work around this restriction
in certain circumstances.
1. If some text should be added to the footer, and the text fits
in the general footer extent, put a fo:marker with the text at
the end of the flow and use fo:retrieve-marker in the footer.
2. Check docs/examples/markers/hide.fo for a more tricky
use case.
3. Use a footnote with an empty inline at the end of the flow.
Note that there is a bug which causes the whole footnote to be
dropped if it wont fit on the page.
4. Use a two pass solution, you must use some XSLT in this case.
For example, write in your XSLT
and pass for the first pass a large number or "no-limit"
as the value for the XSLT parameter named "pages". Watch
how many pages are created, and then repeat with the number
of pages genearted minus 1.
You can build a simple Java wrapper to automate this process,
look here for sample code:
http://marc.theaimsgroup.com/?l=fop-user&m=102002702026609&w=2
J.Pietschmann