我正在使用创建一个多页文档cfdocument
(使用动态文本创建,因此可以有任意数量的页面,甚至一个)。
我可以使用<cfdocumentitem type="footer">
为每一页添加页脚,但是有什么方法可以只在文档的最后一页添加页脚吗?
谢谢。
我正在使用创建一个多页文档cfdocument
(使用动态文本创建,因此可以有任意数量的页面,甚至一个)。
我可以使用<cfdocumentitem type="footer">
为每一页添加页脚,但是有什么方法可以只在文档的最后一页添加页脚吗?
谢谢。
只需添加 evalAtPrint 属性。然后可以使用页码变量有条件地设置页脚。
<cfdocumentitem type="footer" evalAtPrint="true">
<cfif cfdocument.currentPageNumber eq cfdocument.totalPageCount>
This is the last page
</cfif>
</cfdocumentitem>
如您所知,即使 evalAtPrint 设置为 true,您也无法评估 cfdocument.currentpagenumber 以显示特定页面的不同页脚。这是我的解决方案。
http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7758.html