How to query the real text height of a text object

If you are a VB developer and have questions about using our products from VB, here is the place to post them.
Post Reply
A.Hammers.
Posts: 4
Joined: Mon Jan 03 2005

How to query the real text height of a text object

Post by A.Hammers. »

Hello!

I'm doing a report generator using the PDF creator control and have following problem:

The app should add objects like text and lines to a blank document. Text can be single- or multiline. When I add text to the document, I don't know where to start the next object.

How can I get the real text height of a text object (not the object's height) ?

thx,
Andreas
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan »

Hello,

In Design mode, when creating the text objects, you can only retreive the size of the object itself, and not the size of the text inside it.

If you save the file in View only mode than open it again, the text objects will take the same size as the text inside them. but in this case the objects will be saved without their initial name or specification.

I would suggest that you create a fixed size text object and you use this object to write one line of text. To add another line, you can add a new object at a specific location from the first one.
Example: Top of Text2 is equal to Top of Text1 + Height (fix)

If you want to write a new paragaraph you will then use this same text object but at a different location.

I hope this helps, if not you may want to contact support@amyuni.com you can explaing what you are trying to do and our Technical Support Department will try to find the best way to do it.

Have a nice day.
Post Reply