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

setting type size in multiple text fields?

New Here ,
Oct 01, 2022 Oct 01, 2022

I am SO close to being finished with these documents but I can't find the answer to a couple of things.

 

I have a form nicely formatted with nice text fields. The type on the pages is Cambria, but I want to change ALL the form text fields to 12 point Helvetica. I can't figure out a way to do it.

 

I'm using a Mac and figured out that if I select all the text fields, select the Form icon, press the Control key, and click on a text field it will bring up a menu that includes Properties. This allows me to change just one text field at a time.

 

Surely there's a better way???   tia

TOPICS
How to , PDF forms
1.3K
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 ,
Oct 01, 2022 Oct 01, 2022

If you select multiple fields (of the same type!) and then right-click one of them and change its appearance properties it will be applied to all the selected fields. You can also do it using a script, such as this one:

 

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.textFont = font.Helv;
		f.textSize = 12;
	}
}

You can run it from the JS Console, a button or even use it to create a Custom Command, which will allow you to process all the (text) fields in the current file with a single click.

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
New Here ,
Oct 01, 2022 Oct 01, 2022

Thanks, but I'm using a Mac with a track pad, and I don't know what a JS Console is.

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 ,
Oct 01, 2022 Oct 01, 2022
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
New Here ,
Oct 02, 2022 Oct 02, 2022

sigh . . . 

 

I finally figured out how to get to the console (thanks), copied your code, and "ran" it using Command + Enter.  Here's what I got:

 

SyntaxError: syntax error 1:Console:Exec undefined

There has to be an easier way to do this!

 

 

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 ,
Oct 02, 2022 Oct 02, 2022

Did you edit the code I provided in any way? There's no such error in that code.

Did you try to attach it to a Custom Command, as I suggested?

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 ,
Oct 02, 2022 Oct 02, 2022

Also, did you select the full code before running it?

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
New Here ,
Oct 02, 2022 Oct 02, 2022

I guess I didn't explain that I know nothing!!  Was I supposed to select all the code? I did nothing to the code but copy it from your message and paste it into the console window. How would I attach anything to anything like a custom command.

I appreciate your wisdom and counsel, but I am but a grasshopper lost in the weeds!

 

 

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
New Here ,
Oct 02, 2022 Oct 02, 2022

I wasn't aware that I needed to learn coding in order to use Acrobat. That probably explains why I'm constantly having problems like this.

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
New Here ,
Oct 02, 2022 Oct 02, 2022

Hmm, this JS console business may have worked, despite the syntax error. When I click on Forms, then double click on the individual text field it shows up as 12 pt Helvetica, which is what I wanted. On every line!!

 

So I'm going to call this a win and I thank you greatly!!!

 

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 ,
Oct 02, 2022 Oct 02, 2022
LATEST

- You don't need to learn coding to be able to use Acrobat, but it helps if you want to do things more efficiently. I also explained how to do it manually.

- If you didn't select all the code first then it didn't run and did not edit your fields.

- Re custom commands, see here: https://blog.adobe.com/en/publish/2016/03/24/hidden-gems-in-acrobat-dc-create-custom-commands

Or here: http://khkonsulting.com/2015/04/create-custom-tools-in-adobe-acrobat-dc-pro/

 

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