Reputation: 21
<fo:block-container position="absolute" top="3.25in" left="2.9in" height="3.0in" width="7.8in" border-width="0.1in">
<fo:block span="none" white-space-collapse="false" font-family="Arial" font-size="10pt" text-align="start">
<xsl:text>Page</xsl:text>
<xsl:text> </xsl:text>
<xsl:value-of disable-output-escaping="no" select="Visit/current_splitted_page"/>
<xsl:text> </xsl:text>
<xsl:text>of</xsl:text>
<xsl:text> </xsl:text>
<xsl:value-of disable-output-escaping="no" select="Visit/total_page"/>
</fo:block>
</fo:block-container>
I'm placing my XML tags like Current_split
page and total page the result like
Page 0 of 0
for all pages.
How can I accomplish this?
Upvotes: 2
Views: 551
Reputation: 1304
You can get last page number by the following step:
[Example]
<!-- Last fo:page-sequence -->
<fo:page-sequence>
...
<fo:flow flow-name="xsl-region-body" id="id_last_flow">
...
</fo:flow>
</fo:page-sequence>
[Page number reference example]
<fo:block-container position="absolute" top="3.25in" left="2.9in" height="3.0in" width="7.8in" border-width="0.1in">
<fo:block span="none" white-space-collapse="false" font-family="Arial" font-size="10pt" text-align="start">
<xsl:text>Page</xsl:text>
<xsl:text> </xsl:text>
<!--Current page number -->
<fo:page-number/>
<xsl:text> </xsl:text>
<xsl:text>of</xsl:text>
<xsl:text> </xsl:text>
<!--Last page number -->
<fo:page-number-citation-last ref-id="id_last_flow"/>
</fo:block>
</fo:block-container>
Upvotes: 1