Adobe 38043740 - ColdFusion Standard - Mac Development Manual page 1017

Developing applications
Hide thumbs Also See for 38043740 - ColdFusion Standard - Mac:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Working with Documents, Charts, and Reports
<cfdocument format="PDF" bookmark="yes">
<cfdocumentitem type="header">
<font size="-1" align="center"><i>Building Better Applications</i></font>
</cfdocumentitem>
<cfdocumentitem type="footer">
<font size="-1"><i>Page <cfoutput>#cfdocument.currentpagenumber# of
#cfdocument.totalpagecount#</cfoutput></i></font>
</cfdocumentitem>
<cfdocumentsection name="Introduction">
<h3>Introduction</h3>
<p>The introduction goes here.</p>
</cfdocumentsection>
<cfdocumentsection name="Chapter 1">
<h3>Chapter 1: Getting Started</h3>
<p>Chapter 1 goes here.</p>
</cfdocumentsection>
<cfdocumentsection name="Chapter 2">
<h3>Chapter 2: Building Applications</h3>
<p>Chapter 2 goes here.</p>
</cfdocumentsection>
<cfdocumentsection name="Conclusion">
<h3>Conclusion</h3>
<p>The conclusion goes here.</p>
</cfdocumentsection>
</cfdocument>
The bookmarks appear in the bookmarks panel of the PDF document.
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
tag supports the Acrobat security options, as the following table shows:
cfdocument
Last updated 1/20/2012
1012

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents