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

Free Support Forum - aspose.com

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);

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:

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.

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.

output.docx (152.5 KB)


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.