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

Universal change to Text Box Text properties?

Community Beginner ,
Jan 10, 2023 Jan 10, 2023

Copy link to clipboard

Copied

I inherited a large file with a lot of text box comments of varying text sizes (see image as an example).

Is there a way to make a universal change to the text size in these text boxes, or does each one need to be adjusted manually?

Thanks for any help.

TOPICS
Edit and convert PDFs , How to

Views

664

Translate

Translate

Report

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

correct answers 1 Correct answer

Community Expert , Jan 10, 2023 Jan 10, 2023

OK, then you can do it using this code:

 

this.syncAnnotScan();
var annots = this.getAnnots();
if (annots!=null) {
	for (var i in annots) {
		var annot = annots[i];
		if (annot.type=="FreeText") {
			var annotContents = annot.richContents;
			for (var j in annotContents) annotContents[j].textSize = 20;
			annot.richContents = annotContents;
		}
	}
}

 

You can run it from the JS Console (for details, see: https://acrobatusers.com/tutorials/javascript_console), or even from an Action or a Custom

...

Votes

Translate

Translate
Community Expert ,
Jan 10, 2023 Jan 10, 2023

Copy link to clipboard

Copied

It's possible to do using a script. What size do you want them to be?

Votes

Translate

Translate

Report

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 Beginner ,
Jan 10, 2023 Jan 10, 2023

Copy link to clipboard

Copied

Thanks for the response! In this case, I'd say 20 point.

 

(Not entirely sure how to use a script, for what it's worth)

Votes

Translate

Translate

Report

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 10, 2023 Jan 10, 2023

Copy link to clipboard

Copied

OK, then you can do it using this code:

 

this.syncAnnotScan();
var annots = this.getAnnots();
if (annots!=null) {
	for (var i in annots) {
		var annot = annots[i];
		if (annot.type=="FreeText") {
			var annotContents = annot.richContents;
			for (var j in annotContents) annotContents[j].textSize = 20;
			annot.richContents = annotContents;
		}
	}
}

 

You can run it from the JS Console (for details, see: https://acrobatusers.com/tutorials/javascript_console), or even from an Action or a Custom Command, if you have Acrobat Pro.

Votes

Translate

Translate

Report

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 Beginner ,
Jan 10, 2023 Jan 10, 2023

Copy link to clipboard

Copied

This worked perfectly--thank you!!

Votes

Translate

Translate

Report

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 Beginner ,
Jan 11, 2023 Jan 11, 2023

Copy link to clipboard

Copied

I might be getting greedy, but is there a way to format the Text Box so it will automatically display all of the text in a text box? In some situations, the change in font size cuts off the text from being visible (see attached). 

 

Thanks again for any help.

Votes

Translate

Translate

Report

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 11, 2023 Jan 11, 2023

Copy link to clipboard

Copied

LATEST

No, sorry, that's not possible.

Votes

Translate

Translate

Report

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