Copy link to clipboard
Copied
Hello!
I have 5000 + PDFs and I need to make the text size "Auto" for two specific fields in many PDFs and to save them without a prompt. I can't find the solution anywhere. I use Adobe Acrobat DC and the files I need to edit are stored locally. Here's what I have tried. Can someone edit my script? It is not resizing the fields and I am being prompted to save each one rather than the "Save" function happening automatically.
Here are samples of what I tried that don't work. This gives you a clue as to how amateur I am :-):
var f = this.getField("HHMember9-Ethnicity-5")
f.readonly = false
f.textSize = Auto
f.readonly = true
var f = this.getField("HHMember8-Ethnicity-5")
f.readonly = false
f.charLimit= 3;
f.textSize = Auto.size
f.readonly = true
I wonder if the character limit is overriding the text size, or if I am just using the wrong
Thank you kindly, Mr Alheit and try67. This is just what I needed!
Copy link to clipboard
Copied
To set the font size to Auto set it to 0, like this:
f.textSize = 0;
Copy link to clipboard
Copied
PS. There's no need to set the readonly property to false before making changes to the fields, and then back to true.
This property only affects what the user can do with the field, not what a script can do with it.
Copy link to clipboard
Copied
Thank you kindly, Mr Alheit and try67. This is just what I needed!
Copy link to clipboard
Copied
At the end of the action add a save step.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now