Pages extracted using ExtractPages display abnormally

I have a Word document, When I use the following code to extract the page, the extracted page displays abnormally。The content of one page becomes two pages after extraction。

var doc = new Aspose.Words.Document(@"C:\Users\54390\Desktop\demo.docx");
var subDoc = doc.ExtractPages(6, 1);
subDoc.Save(@"C:\Users\54390\Desktop\output.docx");

Version info:

Aspose.Words for Net 23.2

The demo file:

demo.docx (9.9 MB)

The output file:

output.docx (142.4 KB)

The screenshot:

@sullivan
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): WORDSNET-24999

You can obtain Paid Support services if you need support on a priority basis, along with the direct access to our Paid Support management team.

@eduardo.canal
Thanks for the reply, I think this is a very serious bug, I hope it can be fixed as soon as possible. Thanks again.

@sullivan we continue working to mimic the MS Word workflow. For this particular case, please notice that if you disable de option “Compress Punctuation” the document will be rendered in a single page.
CompressPunctuationDisabled

output.docx (152.5 KB)

@eduardo.canal

Thank you! But i don’t think this is a good solution. Because after I execute the following code to extract the first page. According to your settings, the content will become two pages.

var subDoc = doc.ExtractPages(0, 1);

@sullivan Word documents are flow documents, which means there are no pages in the file structure, the pages are calculated in the rendering process. Aspose Words attempts to replicate this process, but there are some configurations you can make in MS Word to change how Word performs this rendering process.
I provide a workaround that will make MS Word render the way Aspose.Words does, but we still have the ticket open and are constantly working to improve the usability of our products.