Including Images in a PDF created in CFDOCUMENT

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.


Creating PDFs from scratch in Coldfusion 8

I figured when I first started this project that it would require the use of CFPDF in order to create a PDF in Coldfusion - wrong. CFPDF is only used to manipulate already existing PDF's.

It is the CFDOCUMENT tag that you use to actually do the initial creation.

Here is an example of how you would create a PDF and output it to the browser window: