I am using PDF templates and placing text in predefined areas on the page. Sometimes the text will not fit in the Acrobat field.
How can I determine if the text will not fit in the defined field and to find out what text was overflowed?
I know I can do this when manually creating a TextArea using the Generator part of DynamicPDF, but I am using templates and need to use Merger.
Niketa
Overflow text in a merger field
Re: Overflow text in a merger field
Support · Jun 3, 2008Hello Niketa,
It is not possible to find if the text you are adding to an existing form field fits in it or not. If you are adding using a TextArea then you can take the overflow text using the GetOverflowTextArea method. It is not possible to get the overflow text added to a form field.
You can get the text width (for a single line) using the GetTextWidth method of the Font class which takes the text and the font size as parameters. You will have to compare the text width and the width of the field you have, so that you can add the text which fits in the field. The remaining text will be the overflow text. But if you want to add this text you will have to use some other page element (a label or a TextArea).
Thanks,
ceTe Software Support Team.