We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Content Conversion

The word conversion of the original page turned into two pages.

@lawnet,

Please ZIP and upload your input Word document and Aspose.Words generated output file showing the undesired behavior here for testing. We will then investigate the issue on our end and provide you more information.

测试测试.zip (12.7 KB)

@lawnet,

MS Word 2019 also renders this Word document into two pages (see msw-2019.pdf (94.0 KB)). The only difference is that Aspose.Words 19.5 moves the 5th item 5. 人事报表 to second page while MS Word 2019 renders it on first page (see 19.5.pdf (42.6 KB)). For the sake of correction, we have logged this problem in our issue tracking system. The ID of this issue is WORDSNET-18567. 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.

@lawnet,

Regarding WORDSNET-18567, we have completed the work on your issue and concluded to close this issue as ‘Not a Bug’. Please see the following analysis details.

The problem occurs because the “pPrDefault” attribute is missing in the problematic document (see “style.xml”), document defaults defined as following:

<w:docDefaults>
    <w:rPrDefault>
      <w:rPr>
        <w:rFonts w:asciiTheme="minorHAnsi" w:hAnsiTheme="minorHAnsi" w:eastAsiaTheme="minorEastAsia" w:cstheme="minorBidi"/>
      </w:rPr>
    </w:rPrDefault>
</w:docDefaults>

MS Word loads predefined document defaults depending on MS Word application version at this case. So, the following code works well:

LoadOptions lo = new LoadOptions();
lo.MswVersion = MsWordVersion.Word2016;

Document doc = new Document(@"in.docx", lo);
doc.Save(@"in_aw_resaved.pdf");

Currently Aspose.Words does not have “MsWordVersion.Word2019” value for “MswVersion” setting. So, we can introduce this value in future, but, it looks like 2016 works similar to 2019 at this case.

So, please explicitly set LoadOptions.MswVersion to MsWordVersion.Word2016 to fix this issue. Hope, this helps.