How do I create page numbers in XSLT?

2019-05-30 23:43发布

Ive created a c# application which gets an xml file and a xslt file and creates an rtf document. This rtf document is to have a header a footer and page numbers but I can't figure out how to do this in xslt.

Anyone have any advice?

1条回答
可以哭但决不认输i
2楼-- · 2019-05-31 00:15

If you specifically need something to be used in XSL, then you can have a block in the footer region (xsl-region-after) and within that block you can have this snippet.

  <fo:block text-align="right"><fo:page-number format="1"/><fo:page-number-citation format="1" ref-id="last-page"/></fo:block>

not to forget to include the following snippet in the

<

fo:block id="last-page"/> just before the  </fo:page-sequence>

HTH

查看更多
登录 后发表回答