ColdFusion:尝试创建动态的可下载PDF,但不创建文件吗? [英] ColdFusion: trying to create dynamic downloadable PDF, but not create a file?

查看:111
本文介绍了ColdFusion:尝试创建动态的可下载PDF,但不创建文件吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法找到此ColdFusion/PDF问题的答案,所以去了:

I haven't been able to find an answer to this ColdFusion/PDF question so here goes:

我已经有一个使用CFDOCUMENT创建动态PDF的后端.用户必须先通过authorize.net提交付款,然后在付款完成后,单击链接以下载我们创建的动态PDF.

I already have a back-end that creates dynamic PDFs using CFDOCUMENT. The user has to submit payment first via authorize.net, then once the payment is processed, they click a link to download a dynamic PDF we create.

PDF已保存在我们服务器上的文件中.用户单击下载链接,将调用CFHEADERCFCONTENT,它们指向服务器上的PDF位置并为其下载.

The PDF is saved in a file on our server. The link the user clicks to download it calls CFHEADER and CFCONTENT which points to the PDF location on the server and it downloads for them.

但是,如果不需要,我不想再将PDF存储在服务器上.我希望他们能够单击链接进行下载,然后动态生成PDF,可以下载,但未保存在服务器上.

However, I don't want to store the PDFs on the server anymore if I don't have to. I'd like them to be able to click the link to download, then have the PDF be generated dynamically, be available for download, but not saved on the server.

这可能吗?或者,如果他们要下载动态创建的PDF,是否必须先为他们创建文件?

Is this possible? Or do you have to create a file for them first if they want to download a dynamically created PDF?

推荐答案

这是我在版本9中的测试页上执行的操作.

Here is how I do it on a test page I have in version 9.

<cfdocument format="pdf">
Hello.  This is a very simple pdf file.
</cfdocument>

它被这个锚标记调用.

<a href="pdf_output.cfm" target="_blank">
Click here to open new tab/window with pdf content that is generated at runtime.
</a>

这篇关于ColdFusion:尝试创建动态的可下载PDF,但不创建文件吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆