One problem that I ran into while creating PDF's recently in Coldfusion 8 was with including images. Despite using what I thought was a valid path (since it would show up in my browser) and using the correct syntax, my images were showing up as red x's. I found out that there is a little trick to including images in a PDF in CF.

After reading through many different blog entries, I learned that there are many reasons as to why an image won't show up in a PDF on a CF server. Basically, it came down to it being some sort of permissions or security issue between the HTTP request sent from the PDF for the image and the Coldfusion server.

Including an image like this didn't work:

view plain print about
1<img src="" />

However, including an image using the File system, rather than HTTP works:

view plain print about
1<img src="file:///#ExpandPath('/images2/images/head_r1_c1.gif')#"/>

Note the 3 forward slashes, as opposed to two.