coldfusion - 使用 cfdocument 时只在最后一页添加页脚

标签 coldfusion footer cfdocument

我正在使用 cfdocument 创建一个多页文档(使用动态文本创建,因此可以有任意数量的页面,甚至一页)。

我可以用 <cfdocumentitem type="footer">为每一页添加页脚,但有什么办法只能在文档的最后一页添加页脚?

谢谢。

最佳答案

只需添加 evalAtPrint 属性。然后您可以使用页码变量有条件地设置页脚。

<cfdocumentitem type="footer" evalAtPrint="true">
    <cfif cfdocument.currentPageNumber eq cfdocument.totalPageCount>
        This is the last page
    </cfif>
</cfdocumentitem>

关于coldfusion - 使用 cfdocument 时只在最后一页添加页脚,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4795207/

相关文章:

hibernate - 如何使用 ColdFusion ORM 映射基类?

mysql - 为什么排序在 MySQL 中有效,但在 Coldfusion 结果集中无效?

javascript - 简单的 coldfusion 将记录 id 传递给 JS 函数?

html - 底部的粘性页脚没有重叠

pdf - 图像未显示在冷融合 10 的 cfdocument pdf 中

coldfusion - 如何使用 CFdocument 设置 DPI?

coldfusion - cfdocument PDF 显示印地语语言字符串为空

arrays - ColdFusion 结构中的数组键

css - 如何让页脚停留在网页底部?

css - 页脚未在不同的设备高度上正确显示