I have seen huge no of postings on CF forum where CFDocument users have complained about seeing red-cross (or red-x
) for images . In this post, I would like to list the reasons why they happen and how they could be resolved .
Before we proceed with different cases of red-x, lets see in brief, how images are rendered in CFDocument.
Now lets see different scenarios one by one
- Image name has space in it. In CFMX 7.0, you can get red-x for images if the image file name has any space in it. For example if the image file name is “my picture.jpg”, only a red-x will appear in the pdf/flashpaper. It happens because the url created for the image is not encoded. A workaround for this is to either use encoded url for the images i.e replace ’space’ in the name with ‘%20‘ OR dont have spaces in the file name at all
. This bug has been fixed in Merrimack (Coldfusion 7.0.1). So if you are still on 7.0, upgrade
- If your server is behind firewall. As we mentioned earlier, CF server needs to send an HTTP request for the images. If the firewall prevents any outgoing connection from the server, CF will not be able to retrieve them and will show a red-x in place of them. You will need to setup your firewall in such a way that server can send an HTTP request to itself.
- If your server is behind a proxy. If Coldfusion server is connected to the external world using a proxy, then also CFDocument will not be able to load the images. This is because currently there is no way you can specify proxy configuration for CFDocument tag.
Current solution to solve this is to define the following system properties for the JVM. You can specify these in “runtime/bin/jvm.config” if you are using standlone or on JRun server.-DproxySet=true -DproxyHost=[hostname] -DproxyPort=[port] -Dhttp.proxyHost=[hostname] -Dhttp.proxyPort=[port]
- If you are using HTTPS and your images do not appear in the pdf/flashpaper, you must ensure the following
- CF server’s certificate is trusted. In other words, certificate of the CA who issued the certificate for you, must be present in the trusted certificate store (runtime/lib/trustStore). You can use keytool to list/view/import/.. certificate in the certificate store.
If CF is using a self signed certificate, CF’s certificate must be present in the trustStore. - The certificate is valid and has not expired.
- Host name of the server must match the host name to which the certificate was issued.
- If the resources on your webserver are protected using some kind of authentication like basic authentication or digest authentication, cfdocument can not retrieve those resources. That is because you can not provide any authentication information to cfdocument tag currently. This means that cfdocument can not retrieve images if it is protected using authentication and you will see a red-x. One solution for this is to replace all image urls with “file” urls.
See this entry for more details on this workaround. The other solution is to write little java code to set a ‘java.net.Authenticator‘. I will post a separate entry for this. - You get red-x for images and you have verified that its none of the above mentioned cases. Time to check the web server now. We have seen some cases where the web server is configured to allow requests only from a certain set of browsers (User agents to be precise) perhaps to prevent spiders and bots from overloading the server. When CFDocument creates a URLConnection for the image, it sends a “User-Agent” header, that looks like “User-Agent:Java/1.4.2_07“, in the HTTP request. If the web server does not recognize “Java” user-agent, it returns a status code of 404 (resource not found) and hence the images can not be displayed. Solution for this case is to either change the configration for the web server or set your own user agent using the following system property on the JVM.
-Dhttp.useragent="ColdFusion"
You can give any name here as userAgent in place of “ColdFusion”.
Hope this helps people in resolving isues related to missing images in CFDocument. In case you are getting a red-x even after verifying all the cases mentioned above, please let me know.
Related Entry :

#1 by Cmmyhxsa on August 13th, 2011
| Quote
Do you know the number for ? red tube norway
( red tube sweet sabrina
) red tube bound
D red tube wife car sex
uusghy red tube lesbian rub
xxzs red tube mature show
0639 red tube pussy wet
%[ nude massage red tube
jnavxy red tube kiss
86584 red tube big hard cocks
=-]] gexo red tube
ywmeop lesbian sexy massages red tube
5547 red tube exotic dancers
:-[ lipstick red tube porn
:-[[ red tube cheerleader gang bang
=))) red tube whilst next too
4467 you tube red groups
%-]] red tube milf latina
:-[[[ red tube cum on my belly
0495 red tube brownies
%-]] erotic butt fucking red tube
523622 red tube peepshow
073 how to download red tube videos
426419 red tube facials
111 red tube angelina joli
253545 red tube tasty
qfqlk red tube nude dancers
phnbm red tube shaved women
ecun blow jobs on red tube
=[[[ red tube tan
73805
#2 by Dkmppsne on September 3rd, 2011
| Quote
We need someone with experience vegas kid shows %)))
#3 by Kemvfqpp on September 5th, 2011
| Quote
real beauty page model preteen toyland 20393
#4 by Njvjulfr on September 6th, 2011
| Quote
I’d like to take the job top 100 lolita sites
orroyd
#5 by Lcltntod on September 7th, 2011
| Quote
Good crew it’s cool
100ree young nymphet
59925
#6 by Xyufzgxk on September 7th, 2011
| Quote
I love the theatre underage incest
8-]]
#7 by Sddvuike on September 19th, 2011
| Quote
Your cash is being counted Preteen Porn Pedo
D Ando Bien Pedo Lyrics
>:[[ Pedo Pussy Pics
owg Pedo Childs
=-))) Pedo Orgy Stories
rplcr Free Pics Pedo
2607 Pedo Nn Young Models
083 Free Pedo Porn
>:((( Lolita Preteen Kid Pedo
%-O Preteen Lolli Cp Dark Pedo
#8 by Cpyxjboj on October 22nd, 2011
| Quote
Have you read any good books lately? Lolita Porn
988
#9 by Gift Ideas on January 11th, 2012
| Quote
qjtrgsvqftil, Gift Ideas, oYnjcdi, [url=http://dewa108.com]Christmas gift baskets ideas[/url], pxDjeGQ, http://dewa108.com Gifts, ghKxeCZ.
#10 by Cialis on January 11th, 2012
| Quote
nwzbmsvqftil, Cialis attorney columbus, NWCYaWe, [url=http://honorguard.org/]Cialis[/url], pongWXu, http://honorguard.org/ Buy cialis by mail, kBRPTeo.