I"m using aspose to generate word report and i want to know my current position at page ( Height) in order to insert page break before i insert new title + large image at bottom of page
Hello
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 document into lines and pages as MS Word does.
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.
I think in your case you can try using “Keep With Next” and “Keep Lines Together” options of paragraph. You can enable/disable these options using Aspose.Words. Please follow the link for more information: https://reference.aspose.com/words/net/aspose.words/paragraphformat/keepwithnext/ https://reference.aspose.com/words/net/aspose.words/paragraphformat/keeptogether/
Best regards,