I'm creating a PDF with cfpdf, then using cfhttp, cfheader, and cfcontent to open up a save dialog. How do I get the page to move to another page after the save dialog is shown? As soon as I add cfcontent to the page, all other processing is stopped (the save dialog pops up, but I can't create a button to move to the next page, or move there automatically).
<cfheader name="Content-Disposition" value="attachment; filename=File.pdf" />
<cfcontent type="application/pdf" variable="#cfhttp.fileContent#" />
This is working as expected. The page stops processing because the content-type is changed and you are now streaming a file. The rest of the markup is ignored.
There are a number of pages that give information to this already:
Also dont forget the documentation:
Name of a ColdFusion binary variable whose contents can be displayed by the browser, such as the contents of a chart generated by the cfchart tag or a PDF or Excel file retrieved by a cffile action="readBinary" tag. When you use this attribute, any other output on the current CFML page is ignored; only the contents of the file are sent to the client.