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

Free Support Forum - aspose.com

Aspose Words .NET. Get entire page content for a given page

hello. so, I have a multi-page document and i need to be able to extract content for any given page. for example how would i get all the contents on page 4 of the document. i don’t understand the whole node concept as it applies to an entire page

Hi Davis,


Thanks for your inquiry. Please check “PageSplitter” example project in Aspose.Words for .NET examples repository at GitHub. Following code example shows how to extract the contents of page 4 of input document. Hope this helps you.

Document doc = new Document(MyDir + “in.docx”);<o:p></o:p>

LayoutCollector layoutCollector = new LayoutCollector(doc);

DocumentPageSplitter splitter = new DocumentPageSplitter(layoutCollector);

Document pageDoc = splitter.GetDocumentOfPage(4);

pageDoc.Save(MyDir + "Out.docx");