Skip to content

Instantly share code, notes, and snippets.

@youcoldfusion
Last active December 15, 2015 21:19
Show Gist options
  • Save youcoldfusion/5325332 to your computer and use it in GitHub Desktop.
Save youcoldfusion/5325332 to your computer and use it in GitHub Desktop.
<cfdocument>
<cfdocument format="PDF">
<table border="1" cellspacing="0" cellpadding="0">
<tr>
<td>Name</td>
<td>Years Of Experince</td>
<td>Current Location</td>
<td>Main Skill</td>
</tr>
<tr>
<td>Animesh Dutta</td>
<td>2 years</td>
<td>Bangalore</td>
<td>ColdFusion</td>
</tr>
</table>
</cfdocument>
<!--- The following example shows how to use the cfdocument scope variables to generate section numbers and page numbers. --->
<cfdocument format="pdf">
<!--- 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