在使用cfdocument时,只将页脚添加到最后一页 [英] Adding a footer only to the last page when using cfdocument
本文介绍了在使用cfdocument时,只将页脚添加到最后一页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用 cfdocument
(使用动态文本创建,因此可以有任意数量的页面,甚至一个页面)创建多页文档。
我可以使用< cfdocumentitem type =footer>
为每一页添加页脚,但是有任何方法,
解决方案
p>只需添加evalAtPrint属性。然后您可以使用页码变量有条件地设置页脚。
< cfdocumentitem type =footerevalAtPrint =true >
< cfif cfdocument.currentPageNumber eq cfdocument.totalPageCount>
这是最后一页
< / cfif>
< / cfdocumentitem>
I'm creating a multipage document using cfdocument
(created using dynamic text so could have any number of pages even one).
I can use <cfdocumentitem type="footer">
to add a footer to every page, but is there any way I can only add a footer to just the last page of the document?
Thanks.
解决方案
Just add the evalAtPrint attribute. Then you can use the page number variables to conditionally set the footer.
<cfdocumentitem type="footer" evalAtPrint="true">
<cfif cfdocument.currentPageNumber eq cfdocument.totalPageCount>
This is the last page
</cfif>
</cfdocumentitem>
这篇关于在使用cfdocument时,只将页脚添加到最后一页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文