User Guide
110 Chapter 2: ColdFusion Tags
The cfdocument tag does not support the Internet Explorer-specific HTML generated by
Microsoft Word.
The PDF or FlashPaper document returned by the
cfdocument tag overwrites any previous
HTML in the input stream and ignores any HTML after the
</cfdocument> tag.
You cannot embed a
cfreport tag in a cfdocument tag.
When you use the
cfdocument tag, ColdFusion MX creates a new scope named cfdocument.
This scope contains the following variables:
• currentpagenumber
• totalpagecount
Note: The cfdocument scope variables are reserved for page number rendering. Do not use them in
ColdFusion expressions. For example, the following code does not work:
<cfif cfdocument.currentpagenumber gt 1>
<cfoutput>#cfdocument.currentpagenumber-1#</cfoutput>
</cfif>
Example
<cfdocument format="flashpaper">
<p>This is a document rendered by the cfdocument tag.</p>
<table width="50%" border="2" cellspacing="2" cellpadding="2">
<tr>
<td><strong>Name</strong></td>
<td><strong>Role</strong></td>
</tr>
<tr>
<td>Bill</td>
<td>Lead</td>
</tr>
<tr>
<td>Susan</td>
<td>Principal Writer</td>
</tr>
<tr>
<td>Adelaide</td>
<td>Part Time Senior Writer</td>
</tr>
<tr>
<td>Thomas</td>
<td>Full Time for 6 months</td>
</tr>
<tr>
<td>Michael</td>
<td>Full Time for 4 months</td>
</tr>
</table>
</cfdocument>