on 02-14-2010 4:40 PM
There is a fixed rectangular area in a form. This area should represent a text.
In case of long text I would like to reduce the font size to fit the text into the area. It should work like that:
http://lh4.ggpht.com/_cAQDpIBg5Bg/S3glj2MIo6I/AAAAAAAAAIk/SN9vEwOEYCY/scale.jpg
Text alignment within the area is Horizontal Centered, Vertical Centered
Text wrap is on
Font is Arial, initial size is 10
Hello,
it would be much easier for you to use "auto-fit" for your field size and let the field expand when the text is long.
Of course you can do what you have described, but why? Is your layout that fixed you cannot expand the field? If so, you can do this through scripting. Where to start with scripting:
http://help.adobe.com/en_US/livecycle/es/FormCalc.pdf
Regards, Otto
p.s.: note there is a Adobe forms forum under NetWeaver
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
1) Yes the area is to be fixed by all dimensions.
2) Yes I know about scripting.
I've had an experience with Adobe in 2008. But I've faced with a problem, at that time it was impossible to understand was text fit the area or not for a variable width font.
I can imagine only one workaround (according to my humble knowledge of livecycle designer)
The workaround is to decrease the font according to number of characters within a script. I sill don't know how to check if text fits the requested area or not in the script. Because the width of the font is variable for my point of view now it is only one way to make the decision to decrease the font size is to build empiric table with the following values number of chars, font size.
But such table won't be be accurate in all circumstances...
But to be honest I don't like this way at all...
I've created the same topic on the Adobe forum and I've received the answer.
[http://forums.adobe.com/message/2592026#2592026]
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.