Copy link to clipboard
Copied
Hi,
I have the option to set the font size to auto, which will adjust the font size automatically based on the text content in text fields (used in prepay forms). Alternatively, I can manually set the font size to 9 or any specific value. However, what I specifically need is to set the font size to adjust automatically within a range, with the maximum font size capped at 9. This means that the font size will automatically adjust between 1 and 9, depending on the content.
I require this functionality because sometimes I have a large multi-line text field with only a short text, such as "Hi". In such cases, the text appears excessively large on the PDF, which looks unattractive. Therefore, I want to ensure that even for short text like "Hi", the font size remains at or below 9.
Copy link to clipboard
Copied
You could do it with a script, by using the number of characters in the field for reference, for example if characters are between 1-5 set size to 9 if between 6-10 set size to 8...etc you can do it using textSize property like this validate script:
var str = event.value;
if(str.length >=1 && str.length <=5)
event.target.textSize = 9;
else if(str.length >=6 && str.length <=10)
event.target.textSize = 8;
Copy link to clipboard
Copied
Hi, that approach won't work for my situation. I have various text fields of different sizes, and the inserted data lengths vary as well.
Copy link to clipboard
Copied
So what are your conditions for text size?
Copy link to clipboard
Copied
I would appreciate it if Adobe could implement an automatic text field font sizing feature with adjustable parameters. For instance, allowing to set the font size to automatically adjust within a range, such as between sizes 3 and 9. This would greatly enhance usability.
Copy link to clipboard
Copied
I'm having a problem with auto font, in that it is creating multiple different sizes. I only want to use it when there is two much test to fit in a text box. Not make the text as large as possible.
Copy link to clipboard
Copied
Use the code provided by Nesa above.
Copy link to clipboard
Copied
I would appreciate it if Adobe could implement an automatic text field font sizing feature with adjustable parameters.
By @Sanchyan36402478alqm
You can submit a feature request here: https://www.adobe.com/products/wishform.html
Copy link to clipboard
Copied
TIP: the maximum text size is relative to the height of the field.
😉
Copy link to clipboard
Copied
Hi, yes, I'm aware of that. The text field height, for example, is set to 0.92cm. This means the maximum text font size can be 18. However, I want to limit the maximum font size to 9 and the minimum to 3 for that text field.
Copy link to clipboard
Copied
how much for 14 font size ?
Copy link to clipboard
Copied
Do as I do, create a field with text in size 14, place another field next to it with text in automatic size and adjust its height until it matches the text in size 14.