cfml - CFDocument not showing dynamic page numbers in lucee -
using lucee, how can add dynamic page numbers pdf file using cfdocument scope variables?
- cfdocument.totalsectionpagecount
- cfdocument.currentsectionpagenumber
- cfdocument.currentpagenumber
- cfdocument.totalpagecount
i tried code below. generates pdf, headers , footers empty, instead of displaying page numbers, ie. "x of y".
<cfdocument format="pdf"> <cfdocumentitem type="header" evalatprint="true"> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <strong><tr><td align="right"><cfoutput>#cfdocument.currentsectionpagenumber# of</strong> <strong>#cfdocument.totalsectionpagecount#</cfoutput></td></tr></strong> </table> </cfdocumentitem> <cfdocumentitem type="footer" evalatprint="true"> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <strong><tr><td align="center"><cfoutput>#cfdocument.currentpagenumber# of</strong> <strong>#cfdocument.totalpagecount#</cfoutput></td></tr></strong> </table> </cfdocumentitem> <cfdocumentsection> <h1>section 1</h1> <cfloop from=1 to=50 index="i"> lorem ipsum dolor sit amet, consectetur adipisicing elit, sed eiusmod tempor incididunt ut labore et dolore magna aliqua. ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.<p> </cfloop> </cfdocumentsection> </cfdocument>
Comments
Post a Comment