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>

View comments in LiveDocs