合并WORD,段落自动增加段后间距8磅

 public static void Merge(string[] paths, string docPath)
 {
     AsposeHelper.SetWordsLicense();

     Document dstDoc = new Document();
     dstDoc.CompatibilityOptions.OptimizeFor(MsWordVersion.Word2019);
     dstDoc.RemoveAllChildren();

     foreach (string path in paths)
     {
         Document doc = new Document(path);
         //doc.CompatibilityOptions.OptimizeFor(MsWordVersion.Word2019);
         dstDoc.AppendDocument(doc, ImportFormatMode.KeepSourceFormatting);
     }

     
     dstDoc.Save(docPath);
 }

任何文档都一样

@luoqin 你能提供一些输入文件和输出文件吗?

输入文档
输入文档.docx (14.1 KB)
输出文档
输出文档.docx (10.2 KB)

@luoqin 感谢您报告此问题。 我们已经在我们的内部问题跟踪系统中打开了以下新工单,并将根据 免费支持政策 中提到的条款提供它们的修复:

Issue ID(s): WORDSNET-27715

如果您需要优先支持以及直接联系我们的付费支持管理团队,您可以获得 付费支持服务

@luoqin 请用最新版本检查以下代码:

Document dstDoc = new Document();
dstDoc.CompatibilityOptions.OptimizeFor(MsWordVersion.Word2019);
dstDoc.RemoveAllChildren();

LoadOptions loadOptions = new LoadOptions();
loadOptions.LanguagePreferences.DefaultEditingLanguage = EditingLanguage.ChinesePRC;
Document doc = new Document("input.docx", loadOptions);
dstDoc.AppendDocument(doc, ImportFormatMode.KeepSourceFormatting);

dstDoc.Save("output.docx");

输入文档


输出文档

样式还是不对,文档我已经发过。

@luoqin 你能确认这段代码解决了段落间距问题吗?
我这边缺少一些字体。你能提供这些字体吗?

仿宋_GB2312.zip (4.3 MB)

@luoqin 不幸的是,我仍然无法重现不同风格的问题。以下是我的输入和输出:

我正在使用Aspose.Words 25.1和MS Word 2019。

The issues you have found earlier (filed as WORDSNET-27715) have been fixed in this Aspose.Words for .NET 25.3 update also available on NuGet.