Free Support Forum -

How would I determine what page in a document a given Aspose.Words.Node (bookmarkstart) is on?

Here is my problem:

I am iterating over the bookmarks collection of a document. I find a bookmark that is “interesting” to my program, then I want to know what page in the final document the bookmark is on, how can I do that?

If I am able to find what paragraph the bookmark is in, would that make it easier?

This is what I want to do:


foreach(Aspose.Words.Bookmark bm in SomeDocument.Bookmarks)
if(bm.Name == “interestingbookmark”)
int bookmarkPageNumber = -1;

//find out what page the bookmark is on

return bookmarkPageNumber;


<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

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.

Aspose.Words uses our own Rendering Engine to layout documents into pages. And we have plans to expose layout information. Your request has been linked to the appropriate issue. You will be notified as soon as this feature is supported.

As a workaround you can try using PageNumberFinder class suggested by Adam in this thread:

Best regards,

The issues you have found earlier (filed as WORDSNET-2978) have been fixed in this .NET update and this Java update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.