I am using ColdFusion 10 Enterprise Edition and cannot display images when using CFDOCUMENT to create a PDF file. The following is a snippet of the code I'm using:
<cfsavecontent variable="report"> <table align='center'> <cfoutput query="VARIABLES.result"> <tr> <td> <div class='addInfoDetails'>#SHOWINFO#</div> </td> </tr> </cfoutput> </table> </cfsavecontent>
In the above code, the VARIABLES.result query comes from the database, and SHOWINFO is a variable containing the image and text. For instance:
SHOWINFO = "<p> Hi This is the test information <img alt="image" src="../TestBank/test/info/5KQ.jpg"/> </p>"
Here, if you reset the SHOWINFO variable inside CFSAVECONTENT , the image is displayed correctly. But when I convert it to PDF using CFDOCUMENT, the image is not displayed.
Below is the code that I use to create pdf:
<cfdocument format="PDF" saveasname="TestPDF"> <cfoutput>#report#</cfoutput> </cfdocument>
Thanks in advance.
source share