Two Pilots™    Home  |  Navigation  |  Site Map  |  Products  |  Download  |  Prices  |  For Partners  |  Support

All forums · Statistics · Search ·

Two Pilots forum / For software developers / Calculating textheight
Author Message
# Posted: 17 Jan 2006 10:44

If you fill a PDFPAGE_TextOutBox with the following text:

This is row one
and this is row two.
This is three
and this is four.

you can get the width of the text box using PDFPAGE_GetTextWidth, but how do you get the height of the box (especially when you don't know how many rows it is)?

Best Regards,

# Posted: 17 Jan 2006 11:31

Dear Ola,

PDFPAGE_GetTextWidth used to get width of the string, so in this case width will be calculated from the most wide string - "and this is row two. ", i think.
There is no method in current version of the library to calculate text box height, that's because you pass it directly to the PDFPAGE_TextOutBox. Function returns the length of the string that was successfully drawn. So, if not all characters was included in output, you'll get relust which is shorter (in characters) than initial string length.

I'll contact developers about possibility to add some kind of PDFPAGE_MeasureText and PDFPAGE_MeasureTextBox functions.

Thank you very much !

Best regards,
Two Pilots



Powered by miniBB 2.0 RC7 © 2001-2004 Page creation time (sec.): 0.013


Page top