Aspose.Words split document into pages

Hello,
how is it possible to split a Word document into pages using Aspose.Words using C# code? If the split is not possible - is it at least possible to find out the page number the Section/Paragraph/Table etc. resides in?

Hi Andrea,

Thanks for your inquiry.

Please note that MS Word
document is flow document and does not contain any information about
its layout into lines and pages. Therefore, technically there is no “Page” concept in Word document.
Pages are created by Microsoft Word on the fly.

However, you can achieve your requirement by using the PageSplitter sample from the offline samples pack. Hope this helps you.

Moreover, Aspose.Words uses our own Rendering Engine to layout documents into pages. Please check DocumentLayoutHelper and EnumerateLayoutElements projects sample from the offline samples pack.
This sample demonstrates how to easily work with the layout elements of
a document and access the pages, lines, rows, spans etc.

Thank you for the quick reply. PageSplitter sample does exactly what I need.

Kind regards,
Andrea

Hi Andrea,

Thanks for your feedback.

Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.