我试图在HTML字符串中包含当前页码的字段。我希望在字符串中包含{{页面}}令牌就足够了,但它只被转换为MailMergeField,而不是被PageField替换。
有人有什么建议吗?
发布于 2018-06-06 06:08:17
请参阅以下HTML:
<html>
<head>
</head>
<body>
<p>
<span style="-aw-field-start:true"></span>
<span style="-aw-field-code:' PAGE '"></span>
<span style="-aw-field-separator:true"></span>
<span style="-aw-field-end:true"></span>
</p>
</body>
</html>当使用以下代码时,Aspose.Words将将此HTML转换为真实的页面字段:
Document doc = new Document("D:\\temp\\in.html");
doc.Save("D:\\Temp\\out.docx");我和Aspose合作,做开发人员的布道者。
https://stackoverflow.com/questions/50709312
复制相似问题