Skip to content

Instantly share code, notes, and snippets.

@youcoldfusion
Created April 6, 2013 08:26
Show Gist options
  • Save youcoldfusion/5325391 to your computer and use it in GitHub Desktop.
Save youcoldfusion/5325391 to your computer and use it in GitHub Desktop.
cfdocument in ColdFusion
<!--- The Password for opening the account is dutta--->
<cfdocument format="pdf" encryption=" 128-bit" userPassword="dutta">
<!--- Header of the pdf document --->
<cfdocumentitem type="header">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="right">
<cfoutput>#cfdocument.currentsectionpagenumber# of #cfdocument.totalsectionpagecount#</cfoutput>
</td>
</tr>
</table>
</cfdocumentitem>
<!--- Footer of the pdf document --->
<cfdocumentitem type="footer">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center">
<cfoutput>#cfdocument.currentpagenumber# of #cfdocument.totalpagecount#</cfoutput>
</td>
</tr>
</table>
</cfdocumentitem>
<!--- Document Sections --->
<cfdocumentsection>
<h1>Section 1</h1>
<cfloop index="i" from="1" to="30">
I am in Section 1<br/><br/>
</cfloop>
</cfdocumentsection>
<cfdocumentsection>
<h1>Section 2</h1>
<cfloop index="i" from="1" to="30">
I am in Section 2<br/><br/>
</cfloop>
</cfdocumentsection>
<cfdocumentsection>
<h1>Section 3</h1>
<cfloop index="i" from="1" to="30">
I am in Section 3<br/><br/>
</cfloop>
</cfdocumentsection>
</cfdocument>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment