Find end of page- page object?

Hi,
I am looking for a couple things.

  1. Number of lines (or) height (or) percentage space left between the end of last line on a page to the footer.
  2. When do I overflow into the next page while building a table. I have a loop where I am inserting rows using document builder, but want to find out when I reach end of page.

Regards,
Manish

Hi

Thank you for your interest in Aspose.Words. MS Word document is flow document and does not contain any information about its layout into lines and pages. Our Rendering Engine layouts documents into lines and pages.
But unfortunately, there is no public API, which allows you to determine where page starts or ends. Also, there is no way to find the position of the particular node on page. Your request has been linked to the appropriate issue. You will be notified as soon as this feature is supported.
Best regards,

Hi Manish,
There is a possible way of doing this right now using the public API, you can see an example implementation here which you could rework. Most likely though the code is too long and complex to rework just for finding overflowing rows in a table.
Instead could you please clarify excatly what you are trying to achieve and we may be able to provide some other suggestions on what you are looking to do.
Thanks,

Thank you Andrey and Adam for the reply. I did glance at the sample code but not sure if it would work for what I am looking for.
We actually have three different things that I need to find end of page for.

  1. If there is any page where the text does not fill more than half the page, then we need to put a message in the blank area " INTENTIONALLY LEFT BLANK"
  2. If a table is going to overflow into the next page, then make sure to place the whole table in the next page.
  3. In a different case if the table overflows in the next page, add a para to the top of each page where the table will have rows.

In both 2 and 3 I would know how many rows are going to be inserted before I start inserting them, but would not know whats the current cursor position relative to the page itself.
I think there is a crude way I can do this by monitoring everything in my code, as I would know from the template docs as to where my tables will begin and end, but that code will not be very scalable to changes in the templates.Was hoping there was something to monitor at the page level itself.
Regards,
Manish.

Hi Manish,
Thank you for additional information. I’m afraid at the moment there is no way to achieve what you need. We will inform you on any developments regarding the feature which will allow you to determine where page starts or ends.
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.
(78)