I've been coding in CF for quite a while but have never used
<cfdocument>. The CF app that I've built is used primarily
for creating customized reports against a corporate database. The
user defines the desired report output; a SQL query is generated
dynamically, and the report output is created dynamically. I tried
wrapping <cfdocument> around the output code, but the browser
hangs when I execute a report. Can <cfdocument> handle
non-static output? If not, is there a way pass the output to
<cfdocument> in straight HTML? Please point me in the right
direction!
cfdocument basically takes a PDF or Flash "snapshot" of the
content currently in the tag. To make documents from dynamic
output, you would have to take a series of snapshots, for example,
by means of a loop. However, Coldfusion will not return any HTML or
CFML code outside the <cfdocument></cfdocument> tag
pair. Hence, one solution is to gather your dynamic content as one
snapshot.