I need to put page breaks in PDF strategically to keep certain lines of text together on the same page.
Is there any way to measure the 'fit' of the text, to determine whether the next line still fits the page or I need to move it to the next page?

Thank you, Sergiy