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?
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
Other pages footer
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.