【发布时间】:2013-06-28 19:33:34
【问题描述】:
我正在动态编写 PDF,并在文档上创建二维码用于电子票务
我将我的 cfdocument localurl=yes 设置为包含不同的图像,这可以正常工作,但是由于我使用 API 调用来获取 qrCode 的二进制文件,因此使用 cfimage 来显示图像,它只显示红色X
<cfdocument format="PDF" overwrite="Yes" localUrl="yes" pageType = "letter">
<body>
<cfoutput>
<section id="header">
<img src="file:///#ExpandPath('images/header.png')#"/>
<cfimage action="writeToBrowser" source="#rc.qrCode#" />
</cfoutput>
</body>
</html>
</cfdocument>
源变量 rc.qrCode 是一个二进制响应,在我放入 cfdocument 之前,它可以完美运行,它会生成一个像 http://mysite/CFFileServlet/_cf_image/_cfimg-7945382145198648283.PNG 这样的 url 作为图像源
我确定这与 localurl 和 file:/// 有关系,我只是不够博学,不知道为什么
【问题讨论】:
标签: coldfusion cfdocument cfimage