Creating a Word document in Coldfusion - how to have pagenumbering?

瘦欲@ 提交于 2019-12-01 16:53:36

Please have a look at this: Header & Footer I have successfully created custom header and footer with only one html file using this article. (Word 2003)

Hope this helps!

Doesn't seem easy to add page number using a WordprocessingML

http://openxmldeveloper.org/archive/2006/08/03/443.aspx

If you can serve PDF instead of DOC, here's a solution for page numbering.

http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7c21.html

See example 2:

<cfdocument format="pdf"> 
<cfdocumentitem type="header" evalatprint="true"> 
    <table width="100%" border="0" cellpadding="0" cellspacing="0"> 
        <tr><td align="right"><cfoutput>#cfdocument.currentsectionpagenumber# of 
            #cfdocument.totalsectionpagecount#</cfoutput></td></tr> 
    </table> 
</cfdocumentitem> 

<cfdocumentitem type="footer" evalatprint="true"> 
    <table width="100%" border="0" cellpadding="0" cellspacing="0"> 
        <tr><td align="center"><cfoutput>#cfdocument.currentpagenumber# of 
            #cfdocument.totalpagecount#</cfoutput></td></tr> 
    </table> 
</cfdocumentitem> 

...    

</cfdocument>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!