gpt4 book ai didi

coldfusion - 在Coldfusion中创建Word文档-如何进行页码编号?

转载 作者:行者123 更新时间:2023-12-03 08:12:15 27 4
gpt4 key购买 nike

我正在使用以下代码创建Word格式的.doc,然后使用cfheader和cfcontent进行转换。一切都很好,但是我需要能够在页眉(或页脚)中放置动态信息,否则自动页码编号将是第二好的选择。

我应该如何修改代码?

<cfsavecontent variable="myDocument">
<html xmlns:w="urn:schemas-microsoft-com:office:word">
<!--- Head tag instructs Word to start up a certain way, specifically in
print view. --->
<head>
<xml>
<w:WordDocument>
<w:View>Print</w:View>
<w:SpellingState>Clean</w:SpellingState>
<w:GrammarState>Clean</w:GrammarState>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
</w:Compatibility>
<w:DoNotOptimizeForBrowser/>
</w:WordDocument>
</xml>
</head>
<body>
Regular HTML document goes here
<!--- Create a page break microsoft style (took hours to find this)
--->
<br clear="all"
style="page-break-before:always;mso-break-type:page-break" />
Next page goes here
</body>
</html>
</cfsavecontent>

最佳答案

请看一下这个:Header & Footer
使用本文,我仅用一个html文件成功创建了自定义页眉和页脚。 (Word 2003)

希望这可以帮助!

关于coldfusion - 在Coldfusion中创建Word文档-如何进行页码编号?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3456413/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com