Mixing CFLAYOUT And PDF/Flash
Wednesday, November 14th, 2007Michael Brennan-White asks:
I am attempting to create a new RIA app using the new Ajax tools in CF8. Is there a special trick needed to display a FlashPaper or PDF in a cflayoutarea?
I am calling the report with this link:
<a href=”javaScript:ColdFusion.navigate(’DebtMFReport.pdf’,'center’)”>
Agency Scheduled Payments Report</a>All that displays is text like this:
(freaky stuff here)It doesn’t matter if I am using an existing PDF file or a PDF generated by a cfr file.
Any suggestions?
What you have to remember is that when you run ColdFusion.navigate, the JavaScript will request the remote URL and take the resultant HTML and place it in the container (whether it be cflayout, cfdiv, etc). When you pointed to a binary file, ColdFusion attempted to write out the binary data to the container, which obviously won’t work well. PDFs can’t be embedded in a page. They must take over the complete page to work. So you are out of luck.
(more…)


