当前位置: 首页 > news >正文

解决c# DocX生成的word文档wps打开排版外边距错乱微软office正常问题

public void insertBreak(DocX document, String filename)
{
DocX tempDocx = DocX.Create(filename);
setPageMargin(tempDocx);
document.InsertDocument(tempDocx);
document.InsertSectionPageBreak(true);

}

 

改为

 

public void insertBreak(DocX document, String filename)
{
DocX tempDocx = DocX.Create(filename);
setPageMargin(tempDocx);
document.InsertDocument(tempDocx);
//document.InsertSectionPageBreak(true);
Paragraph p = document.InsertParagraph();
p.InsertPageBreakAfterSelf();
}

http://www.wxhsa.cn/company.asp?id=4891

相关文章:

  • The 2025 ICPC Asia East Continent Online Contest (II)
  • 工厂方法模式(Factory Method) - 指南
  • 拾忆录
  • 从零搭建RAG应用:跳过LangChain,掌握文本分块、向量检索、指代消解等核心技术实现
  • python高阶技巧
  • 机器视觉之图像处理篇 - 指南
  • 尝试hikari和jdbctemplate
  • 配置Nginx根据IP地址进行流量限制以及返回JSON格式数据
  • 回归
  • CSS纯文本渐变动效
  • 泛微流程共享
  • MySQL报错:未知系统变量tx_isolation及隔离级别查询
  • Redssion
  • if __name__ == __main__:
  • 提升系统可靠性:Air8000多串口硬件设计的黄金法则
  • 20250915笔记
  • enumerate函数
  • 2025国内 HR SaaS 竞争格局:易路以AI深度融合引领行业转型
  • HyperWorks许可激活
  • f-string用法
  • OpenStack Nova instance 常见操作
  • libdpi.dll libdatareport.dll libdash_plugin.dll libcurl-x86.dll libcurl-x64.dll libcurl_x64.dll - 指南
  • 理解 Kubernetes CSI
  • 9.15
  • 常用数学定理公式
  • 线性规划
  • 伪代码学习总结
  • 20号胶 2511
  • 9.13linux系统命令
  • 9.15 svn git