Determining Last page position in xsl-fo

有些话、适合烂在心里 提交于 2019-12-20 07:35:55

问题


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.


回答1:


Hope, it's not too late. But anyway, for all interested people:

  1. 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.

  2. Add this to your repeatable-page-master-alternatives

    <fo:conditional-page-master-reference page-position="last" master-reference="my-last-page"/>




回答2:


This is how you could define the last page. I don`t know your structure but you can add this in a block and reference with your footer.

 <fo:block id="LASTPAGE"></fo:block>


来源:https://stackoverflow.com/questions/12615310/determining-last-page-position-in-xsl-fo

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!