var doc=new Aspose.Words.Document(@"C:\Users\XCL\Desktop\源文件.docx");
doc.Save(@"C:\Users\XCL\Desktop\tttt\out.docx",SaveFormat.Docx);
I used compatibility mode and I had the same problem:
var doc=new Aspose.Words.Document(@"C:\Users\XCL\Desktop\源文件.docx");
doc.CompatibilityOptions.OptimizeFor(Aspose.Words.Settings.MsWordVersion.Word2016);
doc.Save(@"C:\Users\XCL\Desktop\tttt\out.docx",SaveFormat.Docx);
It seems that the issue occurs because the default paragraph properties of the document are missing. MS Word adds values depending on version. The following code fixes the issue:
LoadOptions lo = new LoadOptions();
lo.MswVersion = MsWordVersion.Word2013;
Document doc = new Document("E:\\206490\\in.docx", lo);
doc.Save("E:\\206490\\aspose.words-19.12.docx");
I try it again. But it changes 10 to 8, and I tried other Word versions, the same problem.
My code
Aspose.Words.LoadOptions lo = new Aspose.Words.LoadOptions();
lo.MswVersion = MsWordVersion.Word2013;
var doc=new Aspose.Words.Document(@"C:\Users\XCL\Desktop\源文件.docx",lo);
//doc.CompatibilityOptions.OptimizeFor(Aspose.Words.Settings.MsWordVersion.Word2013);
doc.Save(@"C:\Users\XCL\Desktop\tttt\out.docx");
We tested the scenario and have managed to reproduce the same problem on our end. For the sake of correction, we have logged this problem in our issue tracking system. The ID of this issue is WORDSNET-19688. We will further look into the details of this problem and will keep you updated on the status of correction. We apologize for your inconvenience.
Regarding WORDSNET-19688, please also tell us what version of MS Word you are using on your end to obtain the results similar to what is shown in the image-input-file-preview.jpg (226.8 KB). We see that the value of “space after” is zero in this image. However, MS Word 2013, 2016 and 2019 all show 8 pt and 10 pt in MS Word 2007 and 2010 on our end. Thanks for your cooperation.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.