I'm able to create a PDF no problem but need the page number of the PDF to begin on a certain page -- not 1. Normally I would use the cfdocument scope to show the page number but because I don't want the page number to start on 1 I can't get the code to work. Not sure how best to do this while incrementing each page. Here's the code that works fine:
<cfset theStartPageNumber = 10 />
<cfdocument format="PDF>
<cfoutput query="getPerson">
<cfdocumentsection>
<cfdocumentitem type="header">
<table>
<tr>
<td>My Header</td>
</tr>
</table>
</cfdocumentitem>
#getPerson.FirstName# #getPerson.LastName#
<cfdocumentitem type="footer" evalAtPrint="true" pageNumber="#theStartPageNumber#">
<table>
<tr>
<td align="center"><cfoutput>#attributes.pageNumber#</cfoutput></td>
</tr>
</table>
</cfdocumentitem>
</cfdocumentsection>
<cfset thePageNumber ++ />
</cfoutput>
</cfdocument>
But when I introduce a page break the numbering doesn't increment each page. Here's code that doesn't increment each page number.
<cfset theStartPageNumber = 10 />
<cfdocument format="PDF>
<cfoutput query="getPerson">
<cfdocumentsection>
<cfdocumentitem type="header">
<table>
<tr>
<td>My Header</td>
</tr>
</table>
</cfdocumentitem>
#getPerson.FirstName# #getPerson.LastName#
<cfdocumentitem type="pagebreak" />
#getPerson.Address#
<cfdocumentitem type="pagebreak" />
<cfdocumentitem type="footer" evalAtPrint="true" pageNumber="#theStartPageNumber#">
<table>
<tr>
<td align="center"><cfoutput>#attributes.pageNumber#</cfoutput></td>
</tr>
</table>
</cfdocumentitem>
</cfdocumentsection>
<cfset thePageNumber ++ />
</cfoutput>
</cfdocument>
Using the code that doesn't work the page number will stay "10" for two pages then increment to "11".
Any help is appreciated!