ColdFusion CFDOCUMENT创建一个红色X [英] Coldfusion CFDOCUMENT creates a red X
问题描述
我有一个与ColdFusion的服务器到服务器调用的问题。
I have an issue with a server to server call with ColdFusion.
假设我有两个服务器,每个都有一个文件:
www.Content.com/webpage.cfm
www.Badge.com/badge.jpg
Suppose I have two servers, each with a file:
www.Content.com/webpage.cfm
www.Badge.com/badge.jpg
我的源代码看起来像此:
My source code looks like this:
<cfdocument format="pdf" pagewidth="11" pageheight="8.5">
This is a simple PDF that was created to show issues with content generation on the server. This PDF uses an http:// reference to the badge server to show an image of a badged team member.
<BR />
<BR />
<img src="https://www.badge.com/badge.jpg" />
</cfdocument>
如果我删除CFDOCUMENT标签,页面呈现完美,JPG图像显示完全一样。但是,当我将页面呈现为PDF时,文档不包括JPG文件,并且一个大的,丑陋的红色X出现在图像否则应该。
If I remove the CFDOCUMENT tags, the page renders perfectly and the JPG image shows exactly as it should. However, when I render the page as a PDF, the document does not include the JPG file and a large, ugly red X appears where the image otherwise should.
我的网络管理员建议,虽然用户可以在徽章和内容上进行身份验证,但徽章服务器可能无法验证内容,反之亦然。如何指示冷灌输从当前登录的用户获取用户权限,并拉图像?
My web administrator has suggested that although the user may authenticate on badge and on content, the badge server might not authenticate to content or vice versa. How can I instruct coldfusion to take the user permissions from the currently logged in user and to pull the image?
我研究了使用CFIMAGE并将图像文件保存到内容RAM中,然后在PDF呈现之前将图像写入变量。这似乎产生了一个错误。
I looked into using CFIMAGE and saving the image file into contents RAM, then writing the image to a variable before the PDF renders. That seems to generate a bug.
感谢您的反馈。
推荐答案
p>图像总是不同的吗?否则,您可能想要在您的服务器上本地保存映像,并使用属性 localURL
Is the image always different? otherwise, you may want to save the image on your server locally, and use attribute localURL
另一种可能性是SSL不被CF信任。你可以尝试使用CFHTTP获取该图像URL,你会知道是否是这种情况。请参阅: Coldfusion:具有SSL加密页面的CFHTTP(https: //) - 出现错误
Another possibility might be the SSL not being 'trusted' by CF. You can try fetching that image URL using CFHTTP and you will know if that's the case. see: Coldfusion: CFHTTP with SSL encrypted Page (https://) - got an error
这篇关于ColdFusion CFDOCUMENT创建一个红色X的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!