How do I turn a ColdFusion page into a PDF download?

后端 未结 4 1041
说谎
说谎 2021-02-05 14:07

I would like to turn the HTML generated by my CFM page into a PDF, and have the user prompted with the standard \"Save As\" prompt when navigating to my page.

4条回答
  •  旧巷少年郎
    2021-02-05 14:40

    I'm not that familiar with ColdFusion, but what you need to do is set the Content-Type of the page when the user requests it to be application/octet-stream. This will prompt them for a download every time.

    Hope this helps!

提交回复
热议问题