User Guide

Table Of Contents
768 Chapter 32: Creating Reports for Printing
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>
Using cfhttp to display web pages
You can use the
cfhttp tag in combination with the cfdocument tag to display entire web pages
in PDF or FlashPaper output format, as the following example shows:
<!--- You can pass a URL in the URL string --->
<cfparam name="url.target_url" default="http://www.boston.com">
<cfoutput>
<cfhttp url="#url.target_url#" resolveurl="yes">
<cfdocument format="FlashPaper">
<cfdocumentitem type="header">
<cfoutput>#url.target_url#</cfoutput>
</cfdocumentitem>
<cfdocumentitem type="footer">
<cfoutput>#cfdocument.currentpagenumber# /
#cfdocument.totalpagecount#</cfoutput>
</cfdocumentitem>
<!--- Display the page --->
#cfhttp.filecontent#
</cfdocument>
</cfoutput>
Using advanced PDF options
The
cfdocument tag supports the Acrobat security options, as the following table shows:
Security option Description
Encryption Use the
encryption attribute to specify whether PDF output is encrypted.
Specify one of the following:
128-bit
40-bit
none
User password Use the
userpassword attribute to specify a password that users must enter
to view the document.
Owner password Use the
ownerpassword attribute to specify a password that users must
enter to view and optionally modify the document.