I am generating a pdf using cfdocument and it is working perfectly with this code:
<cfdocument format="PDF" fontembed="true" saveAsName="file1" mimetype="application/pdf" localUrl="true">
<cfoutput>
#response.filecontent#
<cfdocumentitem type="footer">
#cfdocument.currentpagenumber# of #cfdocument.totalpagecount#
</cfdocumentitem>
</cfoutput>
</cfdocument>
If I include the #session.footer# variable inside it, it takes a lot of time to generate the PDF.
<cfdocument format="PDF" fontembed="true" saveAsName="file1" mimetype="application/pdf" localUrl="true">
<cfoutput>
#response.filecontent#
#session.footer#
<cfdocumentitem type="footer">
#cfdocument.currentpagenumber# of #cfdocument.totalpagecount#
</cfdocumentitem>
</cfoutput>
</cfdocument>
The footer variable contains a complete footer section which I want to add at the end of the document. I am don't understand why it is this is taking so much longer. I am using ColdFusion 10.
Have you tried creating the PDF using cfdocument, and then applying the footer using cfpdf as a second process? As with the above comments, it could be what is held in the session variable as well.
I would have left this as a comment instead of a solution, but StackOverflow wont let me :(