Can someone please explain, or point me to a place that explains? I couldn't find anything that really tells me what is going on here.
My problem: a multi page PDF has page headers (created by <cfdocumentitem type="header">). In the body of the data (in my case, tabular data), I need to know in each line if an automatic page break has happened - in this case I need to display a table header (one that contains dynamic data, not something static that I could put into the cfdocument-header).
So far, I have found no way to detect that a page break has happened. Working with variables doesn't work at all. The logic of this thing seems to be very strange, and counterintuitive.
I need to understand
1) What is the program flow here? Are cfdocument body, header, and footer executed somehow sequentially, and in what order?
2) especially, is there any way to use variables that are known to body, header, and footer in a consistent way so that there can be some kind of logic? if I create a variable outside of the <cfdocument>, I expect it to be known to all parts of the PDF - to the body, to the header, and to the footer. I already found that I need to specify "evalatprint=true" in header and footer if I want to use the variables there.
But such a global variable, incremented (and successfully displayed) in the header, stays at zero in the page body until the end, and its value is strangely different in the footer than in the header (footer variable value = header variable value - 1).