Hi,
I've just started using PDF Generator 5, so appologies if this is an obvious question. I am converting an ASP page that used Dynamic PDF v2.6 into an ASP.Net page and am having a couple of issues becuase the object model seems to have changed.
Part of the code uses a 'Metrics' object to get the height of some text, in order to work out the position of the next line. The code it uses is:
set objmetrics = m_objDocument.Metrics
m_intCurrentPos = m_intCurrentPos + objmetrics.GetTextHeight(trim(some_text),210,intVerdanaBoldFont, 8.5)
I cannot see an obvious way of replicating this with the new object model.
Can anyone give a suggestiong of how to do this?
Thanks in advanced
Jason
Getting the height of text
Re: Getting the height of text
Support · Aug 21, 2008Hello Jason,
You can get the height required for the given string using the GetRequiredHeight method of the TextArea object. You can create a TextArea with any height and then reset the height to the value returned by GetRequiredHeight() method.
Thanks,
ceTe Software Support Team
Re: Getting the height of text
Forum member · Aug 26, 2008Thanks very much for that!