cfdocument: open download prompt to ask user where to save pdf
I'm using cfdocument to create a pdf. Displaying the pdf in the browser works fine, but I would like to just open a download prompt when the user opens that url.
<cfdocument format="PDF" localUrl="yes" margintop="0.25" orientation="landscape">
What I tried: I followed this and added a filename: https://community.adobe.com/t5/coldfusion-discussions/how-to-use-cfdocument-create-a-pdf-file-and-save-the-file-in-server/td-p/966276
But it just saves that file in a lucee temp folder.
I also tried using a header like this:
<cfdocument format="PDF" localUrl="yes" margintop="0.25" orientation="landscape">
...
Your PDF content goes here...
</cfdocument>
<cfheader name="Content-Disposition" value="attachment; filename=your-file-name.pdf">
<cfcontent type="application/pdf" file="#expandPath('your-file-path.pdf')#">But it also doesn't open a download prompt.
What I want is that it opens a prompt and asks the user, where he wants to save that file.
