我使用cfcontent从Web根外部流式传输图像。当在浏览器中直接调用各种页面时,图像显示正确,但图像在生成的PDF中显示一个红色的X.在出口页面:无法使用cfdocument/cfcontent包含pdf中的图像
<cfsavecontent variable = "gridCode">
<cfinclude template="pathToGeneratedPage.cfm" >
</cfsavecontent>
<cfdocument format="pdf" filename="#filename#" overwrite="yes" localUrl="yes">
<cfdocumentsection >
<cfoutput>#gridCode#</cfoutput>
</cfdocumentsection>
</cfdocument>
与内容的页面中产生:
<img src="pathToDisplayPhoto.cfm?image=#someImage#" />
在displayPhoto.cfm页:
<cfcontent type="image/*" file="#pathToUploadFolderOutsideWebRoot##url.image#" deleteFile = "No">
我包括cfdocument属性localUrl = “是”,因为默认(no)不起作用。明确设置为“否”也不起作用。
有什么建议吗?
请问这个岗位帮助? http://stackoverflow.com/questions/4813587/dynamic-pdf-cfdocument-cfcontent-image-email-attachement – Travis 2012-08-15 13:47:27
特拉维斯,你知道吗,我看到了线程,不管出于什么原因没我认为它适用于我的问题。但是,是的,使用而不是作品。谢谢!添加它作为答案,我会给你的观点:) –
earachefl
2012-08-15 16:25:03