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

Free Support Forum - aspose.com

Extract content based on text in page

Hello,
We are looking at Aspose as a solution to pulling particular pages from a word doc based on the text in the page. For example, If the page title is 'Medical abc', that page needs to be extracted and saved as a new file.
I looked through your product documentation and could only find content extraction based on styles, nodes and other document elements. Please point me in the right direction if I may have misinterpreted the documentation

Thank You

Hello

Thanks for your request. 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.

But I think in your case you can try applying some specific style to the content on the pages and then you can try using the code from this link to extract content based on style:

http://www.aspose.com/documentation/.net-components/aspose.words-for-.net/howto-extract-content-based-on-styles.html

Hope this helps.

Best regards,

Thanks for your reply Andrey. So, I understand that my only option is to find the style properties of the text, or a combination of style and section elements to grab the content.
Thanks
Kiran

Hello

Thanks for your inquiry. Yes, I’m afraid in your case it is the only option for you. Or you can try using Bookmarks to mark page start and page end.

Best regards,