We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

How do I find out how many lines a Run spans?

So I have a particular run:


The text in this run varies and thus sometimes the Run will span two lines but other times it will span one line. How do I tell how whether the Run is all on one line?

Hi Adam,

Thanks for your inquiry. Please note that MS Word document is flow document and does not contain any information about its layout into lines and pages. Therefore, technically there is no “Page” and “Line” concept in Word document.
Aspose.Words uses our own Rendering Engine to layout documents into pages and lines. Please check using the DocumentLayoutHelper sample from the offline samples pack. This sample demonstrates how to easily work with the layout elements of a document and access the pages, lines, rows, spans etc.

Hope this helps you. Please let us know if you have any more queries.