We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Is it possible to Iterate through textranges by page

Thread ID:

Created:

Updated:

Platform:

Replies:

131895 Aug 1,2017 11:17 PM Aug 3,2017 02:42 AM UWP 3
loading
Tags: DocIO
Brian Benson
Asked On August 1, 2017 11:17 PM

I'd like to be able to examine the text in all text ranges in a word document and know which page each word is on.

I can't see a way to programmatically determine this.  Can someone tell me if this is possible using DocIO and where I could look for more information or a code sample?

Mohanaselvam  Jothi [Syncfusion]
Replied On August 2, 2017 09:21 AM

Hi Brian,

Thank you for using Syncfusion products.

The Word document is a flow document in which contents will not be preserved page by page; instead the contents will be preserved sequentially section by section. Each section may extend to various pages based on its contents like table, text, images etc. Word viewer/editor renders the contents of the Word document page by page dynamically when opened for viewing or editing and these page wise rendered information will not be preserved in the document level as per the Word file format specification. Whereas Essential DocIO is a non UI component that provides a full-fledged document object model to manipulate the Word document contents. Hence currently it is not feasible to get the document contents page by page.
 
For your reference please refer the below code snippet to get the section for the corresponding text range. 
 
Code Snippet: 
 
//Get the section of the textrange. 
WSection section = (textRange.OwnerParagraph.OwnerTextBody.Owner as WSection); 
 
 
Could you please update us your exact working scenario which will be helpful for us to provide you a prompt solution at the earliest. 

Please let us know if you have any other questions.

Regards,
Mohanaselvam.

 


Brian Benson
Replied On August 2, 2017 09:33 AM

Thank you for your reply.

From what I could tell, there was no way to keep track of pages, but I thought I would ask just in case I missed something.


Mohanaselvam  Jothi [Syncfusion]
Replied On August 3, 2017 02:42 AM

Hi Brian,

Thank you for your update. Please let us know if you need any further assistance. We will be happy to assist you as always.

Regards,
Mohanaselvam.
 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;