Copy link to clipboard
Copied
This question was posted in response to the following article: http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7758.html
Copy link to clipboard
Copied
Adding a footer to a PDF report that spans 40 pages is doubling the time taken to create the report without footer. Is there any way to reduce the time taken?
Copy link to clipboard
Copied
As you know you cannot evaluate cfdocument.currentpagenumber to display a different footer for a particular page even with evalAtPrint set to true. Here is my solution.
<cfset pagenum = 0>
<cfdocumentitem type="footer" evalAtPrint="true">
<cfset pagenum = pagenum + 1>
<cfif pagenum eq "1">
First page footer
<cfelse>
Other pages footer
</cfif>
</cfdocumentitem>
Copy link to clipboard
Copied
This tag has a problem and this page doesn't have any information about it.
cfdocumentitem tag throws error from time to time because it doesn't recognize variables defined outside of the tag.
The solution is pass variables as attributes and use attributes scope inside cfdocumentitem tags. I found this solution here.
http://jacfb.com/index.cfm/2010/1/9/Passing-agruments-to-cfdocumentitem