XSLFTextShape#getTextHeight() returns the cumulative height occupied
by the text, but this method is private for now. The implementation is
pretty complex and takes into account all character and paragraph
properties such as font size and family, line spacing, spacings before
and after paragraphs, margins, indents, etc.

I'm going to make it public. For now you can call it via reflection or
apply this change to trunk and use your custom build.

Yegor

On Wed, Nov 23, 2011 at 2:51 AM, Mike Lundin <[email protected]> wrote:
> I have a text box with a set width (essentially, a entry in a column). I
> would like to add text to the text box and determine how much vertical
> space that text will take up with the document. This will allow me to
> position the next element just below the current one.
>
> I'm currently performing an estimation of the height based on a FontMetrics
> object, but it's not exact and will sometimes result it large gaps or text
> running over other elements.
>
> Is there a way to do this?
>
> Thanks,
> Mike
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to