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

Universal change to Text Box Text properties?

Community Beginner ,
Jan 10, 2023 Jan 10, 2023

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
2.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
1 ACCEPTED SOLUTION
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 Command, if you have Acrobat Pro.

View solution in original post

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

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

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

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)

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 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 Command, if you have Acrobat 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
Community Beginner ,
Jan 10, 2023 Jan 10, 2023

This worked perfectly--thank you!!

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

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.

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

No, sorry, that's not possible.

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