我有一个困扰我的问题。
我正在生成一个带有 CF 的 PDF
解释这个问题的最简单方法是看一下这个 PDF 。
http://www.essendondpc.com.au/_temp/referrals/referral_120208085540.pdf
您会注意到右上角有 4 张图像。其中两个未正确嵌入,另外两个正确嵌入。
以下是图像的图像标签:
<!---NOT DISPLAYING--->
<img src="http://www.essendondpc.com.au/_images/globalMarkBlack.jpg" width="100">
<img src="http://www.essendondpc.com.au/_images/submit.gif" width="100">
<!---ARE DISPLAYING--->
<img src="http://www.a-s-a.com.au/_images/banners/asa2012_tall.jpg" width="100">
<img src="http://www.sunburyonline.com.au/Classifieds/photos/IMG_3796.JPG" width="100">
图像位于服务器上,但由于某种原因,位于生成 PDF 的域中的 2 个图像未嵌入。我就是不明白为什么。
非常感谢任何让我远离疯狂悬崖的建议。
谢谢杰森
I have a problem that is doing my head in.
I am generating a PDF with CFs <cfdocument format="pdf" ...
Easiest way to explain this problem is to take a look at this PDF.
http://www.essendondpc.com.au/_temp/referrals/referral_120208085540.pdf
You will notice in the top right there are 4 images. Two are not embedding properly, and 2 are.
Here are the image tags for the images:
<!---NOT DISPLAYING--->
<img src="http://www.essendondpc.com.au/_images/globalMarkBlack.jpg" width="100">
<img src="http://www.essendondpc.com.au/_images/submit.gif" width="100">
<!---ARE DISPLAYING--->
<img src="http://www.a-s-a.com.au/_images/banners/asa2012_tall.jpg" width="100">
<img src="http://www.sunburyonline.com.au/Classifieds/photos/IMG_3796.JPG" width="100">
The images are sitting on the server, but for some reason, the 2 images sitting at the domain that the PDF is being generated at are not embedding. I just can't work out why.
Any suggestions to keep me off the cliff of insanity are greatly appreciated.
Thanks
Jason
发布评论
评论(2)
我遇到了类似的问题,并能够使用以下语法解决它:
由于进行了此更改,因此没有发生错误并且图像始终显示。我存储的是
“file:///C:/websiteDirectory/images/”作为应用程序变量并将其调用为:
I ran into a similar problem and was able to resolve it using this syntax:
Since this change was made no errors occur and the images always display. I store the
"file:///C:/websiteDirectory/images/" as an application variable and call it as:
您是否尝试过
中的localUrl=true
并使用相对路径?Have you tried
localUrl=true
in<cfdocument>
, and use relative path?