CFDOCUMENT- only the first PDF has the background image displayed in a loop
Here is the sample code. The first PDF file is created just fine, but the rest files are missing background image. Similar issue was reported here Very odd CFDOCUMENT Bug | Raymond Camden's Blog, but I could not find a solution to this issue. Would appreciate any input!
<cfloop query = "MyQuery">
<cfdocument format = "PDF" filename="./docs/#filename#"
overwrite="yes"
localurl="true">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<style type="text/css">
body
{
background-image:url('image.jpg');
background-repeat:no-repeat;
}
</style>
</head>
<cfoutput >
<body>
| <table width="100%" cellpadding="0" border=0> | |||||||||||||||
| <tr> | |||||||||||||||
| <td height="280px" colspan="4"> </TD> | |||||||||||||||
| </TR> | |||||||||||||||
| <tr valign="top"> | |||||||||||||||
| <td align="center" colspan="4"> | |||||||||||||||
| <span style="font-size:48; font-family: Calibri; color: black;font-weight: bold;"> | |||||||||||||||
| #FirstName# #LastName# | |||||||||||||||
| </span><br> | |||||||||||||||
| <span style="font-size:25; font-family: Calibri; color: black;font-weight: bold;"> | |||||||||||||||
| for the | |||||||||||||||
| </span> <br> | |||||||||||||||
| <span style="font-size:48; font-family: Calibri; color: black;font-weight: bold; "> | |||||||||||||||
| #qNomination.proj_name# Project | |||||||||||||||
| </span> | <br> | ||||||||||||||
| </td> | |||||||||||||||
| </tr> |
| </body> |
</cfoutput>
</html>
</cfdocument>
</loop>



