This tip shows you how to use the
fo:page-number and
fo:page-number-citation elements to insert page numbers.
To insert page numbers in your page's footer, use fo:static-content:
<fo:static-content flow-name="xsl-region-after">
<fo:block text-align="center" background-color="#CFD0FA">
Page [<fo:page-number/>] of [<fo:page-number-citation ref-id="last- page" />]
To find out how many pages are in the document, simply insert a blank
fo:block in the last
fo:page-sequence, like this:
<fo:block id="last-page">
</fo:block>