Quantcast
Channel: Aspose.Pdf Product Family
Viewing all articles
Browse latest Browse all 3131

Knowing the Text para length

$
0
0
Hi,

I have a pdf document where I have already drawn a Text para. After that I want to draw a floating box; but for drawing a floating box, I need to know the number of lines that text has spanned.

Is there any way to know the number of lines or the height of the Text.

I have tried the following options, but they all return -1 or 0.0 (default values) I guess.

((Text)paragraph).getHeight() // returns -1
((Text)paragraph).getTextWidth() // returns 0.0. If I can get the width, I can say the number of lines by comparing to pdf width.

Thanks!!

Viewing all articles
Browse latest Browse all 3131

Trending Articles