ColdFusion Muse

You CAN Use the File System With Cfdocument (Who Knew)

In regard to my previous post on Cfdocument and SSL I stand corrected. It is definitely possible to use a "file:" protocol identifier in the image path when using Cfdocument. My problem was with the syntax. As is often the case, a helpful reader put me on the right path. Thanks to Julian Halliwell for pointing out that my problem was syntax. I was trying 2 slashes as in:

<img src="file://d:\mysite\images\myimage.jpg" width="50" height="60">
Julian noted that it should actually be 3 leading slashes after the "file:" protocol identifier.
<img src="file:///d:\mysite\images\myimage.jpg" width="50" height="60">

Not only is this a rock solid fix for the SSL issue (see the previous post) but it has the potential to dramatically impact the speed of your cfdocument call, especially if you using large images. We have an application that embeds fairly large photographic images. I'm guessing this will greatly increase the speed of rendering. I'll post a follow up and let you know.

Related Blog Entries

Comments
Steve's Gravatar How much success did you have when trying to load large JPEGs into a PDF via cfdocument?

I am having time out issues - but strangely enough, if I use GIFs it loads no problem. Obviously I can't just use GIFs to display photos in a PDF so I am still searching for a solution..
# Posted By Steve | 12/6/06 5:15 PM
federico's Gravatar THANKS VERY MUCH!!!!
# Posted By federico | 2/27/08 11:37 AM



Blog provided and hosted by CF Webtools. Blog Sofware by Ray Camden.