I have a puzzler. I have a piece of code that gene...
# cfml-general
g
I have a puzzler. I have a piece of code that generates a pdf using cfdocument. I have a footer saying <cfdocumentitem type="footer"> Function Sheet for #getItem.Agenda_Name# Page #cfdocument.currentpagenumber# of #cfdocument.totalpagecount# </cfdocumentitem> Which works great. But I also have a report that returns multiple of these pdfs and merges them into one document. It errors saying "Element PDF is undefined in a Java object of type class coldfusion.thread.ThreadScope. The error occurred in C/.../inc report databeo.cfm line 79" https://pastebin.com/fwdKjf7G
Line 79 is <cfset tempCopy = cfthread[i].pdf>
If I get rid of the footer no error.
I still need the page numbers in the merged pdf.
I'm trying what Ray Camden told someone here that was getting the exact same error: https://www.raymondcamden.com/2009/06/17/CFThread-Example-Creating-and-merging-PDFs
I put a dump <cfdump var="#cfthread#"><cfabort> and see that every row in the cfthread scope HAS a "PDF" variable.
message has been deleted
Well, I wrapped that line with a cftry/cfcatch and I still get all the pdfs with the footer. I'm not sure why it was errorring.