Skip to main content
Participant
January 5, 2022
Question

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

  • January 5, 2022
  • 2 replies
  • 5023 views

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).

This topic has been closed for replies.

2 replies

try67
Community Expert
Community Expert
January 5, 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.

Dave Creamer of IDEAS
Community Expert
Community Expert
January 5, 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. 

David Creamer: Community Expert (ACI and ACE 1995-2023)
try67
Community Expert
Community Expert
January 5, 2022

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;
	}
}
Dave Creamer of IDEAS
Community Expert
Community Expert
January 5, 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. 

David Creamer: Community Expert (ACI and ACE 1995-2023)