我有以下情况:我使用 cfdocument 标签创建了一个 PDF,但文档值是由其他一些 cf 函数生成的。现在我需要在特定点进行一些分页符,但它在逻辑上不适用于 cfdocumentitem (pagebreak) 标记,因为它没有嵌套在 cfdocument 标记中。我试图用特定的字符串标记需要这些分页符的点,并以某种方式用 cfdocumentitem 标记替换它们。但正如预期的那样,它不起作用。
<some function>
<table>blablahtml</table>
<cfif pdfreport>markedforpagebreak</cfif>
<table>blablahtml</table>
.
.
.
</some function>
<other function>
<cfdocument>
#replace(dashboardHTML,"markedforpagebreak","<cfdocumentitem type='pagebreak'/>","all")#
</cfdocument>
</other function>
我还查看了 evalAtPrint 属性,但它也不起作用..有没有人想办法解决我的问题?谢谢 =)