
1011
DEVELOPING
COLDFUSION 9 APPLICATIONS
Working with Documents, Charts, and Reports
Las
t
upda
te
d 8/5/2010
<cfoutput>
<tr>
<td><font size="-1">
#empSalary.lastname#, #empSalary.firstname#</font>
</td>
<td align="right"><font size="-1">
#DollarFormat(empSalary.salary)#</font>
</td>
</tr>
<cfset deptTotal = dep empSalary.salary>
</cfoutput>
<tr>
<td align="right"><font size="-1">Total</font></td>
<td align="right"><font size="-1">#DollarFormat(deptTotal)#</font></td>
</tr>
<cfset deptTotal = 0>
</table>
</cfdocumentsection>
</cfoutput>
</cfdocument>
Using the cfdocument scope
When you use the
cfdocument
tag, ColdFusion creates a scope named
cfdocument
. This scope contains the following
variables:
currentpagenumber
Displays the current page number.
totalpagecount
Displays the total page count.
currentsectionpagenumber
Displays the current section number.
totalsectionpagecount
Displays the total number of sections.
Note:
You can use the
cfdocument
scope variables in expressions within the
cfdocumentitem
tag only.
You typically use these variables in a header or footer to display the current page number and total number or pages,
as the following example shows:
<cfdocumentitem type= "footer> #cfdocument.currentpagenumber# of
#cfdocument.totalpagecount#</cfdocumentitem>
Creating bookmarks in PDF files
You can use the
cfdocumentbookmark
attribute to create bookmarks for each section within a PDF document, as the
following example shows:
Содержание COLDFUSION 9
Страница 1: ...Developing Applications ADOBE COLDFUSION 9...