Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How to change all fields in a fillable PDF to wrap text?

New Here ,
Jan 05, 2022 Jan 05, 2022

I am trying to create a fillable PDF form (from a word doc) where I need most fields to have text wrapping (but not scrolling). Is there a way to make this the default setting when creating the PDF? The original document is 14 pages long, so I'm not eager to go edit each field individually (and it won't negatively impact the fields that don't need that for it to be set that way).

TOPICS
How to , PDF forms
4.8K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 05, 2022 Jan 05, 2022

You should be able to select the fields on the right of the screen, right-click to get to Properties, and turn on multi-line. 

If it's all text fields, it can probably be done by scripting, but that's above my pay grade. 

image.png

David Creamer: Community Expert (ACI and ACE 1995-2023)
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 05, 2022 Jan 05, 2022

I'm not sure what you mean by "text wrapping but not scrolling"... What exact settings do you want to select in the Properties dialog?

Either way, you can't change the default settings of the fields. What you can do, though, is change them after the fact, either manually, or using a script.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 05, 2022 Jan 05, 2022

>>"text wrapping but not scrolling".

I assumed the OP meant Multi-line is on; Scroll long text is off

 

To make it default, change the settings the way you want in the Properties panel. 

Then right-click on the field and select Use Current Properties as New Defaults. 

image.png

David Creamer: Community Expert (ACI and ACE 1995-2023)
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 05, 2022 Jan 05, 2022
LATEST

That doesn't change the way new fields are created automatically, only manually.

 

If that's indeed the case you can use the following code to apply these settings to all the text fields in the file:

 

for (var i=0; i<this.numFields; i++) {
	var fname = this.getNthFieldName(i);
	var f = this.getField(fname);
	if (f==null) continue;
	if (f.type=="text") {
		f.multiline = true;
		f.doNotScroll = true;
	}
}
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines