Copy link to clipboard
Copied
Hi,
i am trying to dump cfsavecontent into cfdocument (PDF) but it doesn't seem to work, what am i doing wrong?
<cfinclude template="javaschedule.cfm">
<cfsavecontent variable="myHTML2">
<p id="arr1" ></p>
<script type="text/javascript">
disptbl();
</script>
</cfsavecontent>
<!--- <cfoutput>#myHTML2#</cfoutput> ---> <!--- if i uncomment this, the table is dumped on the screen --->
<cfdocument format="PDF" pagetype="A4" margintop="1" marginbottom="1" orientation="portrait" unit="cm" backgroundvisible="yes" overwrite="yes" fontembed="no" filename="#application.saverpt#\#ATTRIBUTES.vpdfname#-#DATEFORMAT(now(),'DD-MM-YY')#.PDF" >
<cfset brnom = application.libCFC.capFirstList('#session.brname#')>
<cfset xtitle='#ATTRIBUTES.vtitle#'>
<cfset xtitle2='#ATTRIBUTES.vtitle2#'>
<cfset xtitle3='#ATTRIBUTES.vtitle3#'>
<CFOUTPUT>
<table width="100%" border="0" align="center" class="data">
<tr class="head2">
<td width="200"><b>#application.companyname#<br />#session.userbrnm#-#brnom#<br /><cfinclude template="formheader.cfm"></b><br /><hr align="left" width="95%"/></td>
<td align="center"><H3>#xtitle#<br />
#xtitle2#<br />
#xtitle3#</H3></td>
<td width="180" align="right" >
<table width="100%" border="0">
<tr>
<td align="right"><b>DATE :</b></td>
<td align="left"><b>#dateformat(now(),'dd/mm/yyy')#</b></td>
</tr>
<tr>
<td align="right"><b>TIME :</b></td>
<td align="left"><b>#TIMEformat(now(),'HH:MM:SS')#</b></td>
</tr>
<tr>
<td align="right"><b>User :</b></td>
<td align="left"><b>#Session.user#</b></td>
</tr>
<tr>
<td colspan="2"><hr width="60%" /></td>
</tr>
</table>
</td>
</tr>
</table>
#myHTML2# <!--- the above table is displayed in the PDF but cfsavecontent (myHTML2) is not --->
</cfoutput>
<cfdocumentitem type="footer" evalatprint="true">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td align="center">
<cfoutput>Page:#cfdocument.currentpagenumber#/#cfdocument.totalpagecount#</cfoutput>
</td></tr>
</table>
</cfdocumentitem></td>
</cfdocument>
Have something to add?