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

Change font color of multiple "text comments" at once

Community Beginner ,
Sep 18, 2022 Sep 18, 2022

Hi,

is there a way to to change the font color of several text comments at once, just like you can with the "Highlight Text" feature? (I know how to do this for each text comment individually, but I haven't found a way to do this for multiple comments at once yet).

 

Many thanks in advance.

 

Best,

Nick

3.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
2 ACCEPTED SOLUTIONS
Community Expert ,
Sep 19, 2022 Sep 19, 2022

There's no way to do it manually, because you need to select the actual text first to be able to edit its color, but it can be done using a script. For example, this code will change all the selected (Text) comments to red:

 

this.syncAnnotScan();
var annots = this.selectedAnnots;
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].textColor = color.red;
			annot.setProps({richContents: annotContents});
		}
	}
}

 

It's also possible to write a script to edit all Text comments in the file, selected or not, to red (or any other color, of course).

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 ,
Sep 19, 2022 Sep 19, 2022

You can't use it as an Action because that won't allow you to select comments first. You can run it from a Custom Command or a menu item, though.

If you want to apply this change to all Text comments in the file just change this line:

var annots = this.selectedAnnots;

To:

var annots = this.getAnnots();

Then you would be able to run it as a part of an Action.

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 ,
Sep 19, 2022 Sep 19, 2022

Select the "Black Arrow" tool which is located just to the left of the Hand tool.

Use the CTRL key to multiselect (should be CMD on Mac), it does not work with the Shift key.

Click in the color palette to select the color.

 

Capture_902.png


Acrobate du PDF, InDesigner et Photoshopographe
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 ,
Sep 19, 2022 Sep 19, 2022

Hi JR Boulay,

First of all, thanks for your reply. Unfortunately, you demonstrated the way how to do it for "sticky notes" but not for "text comments" as shown in my attachments. Whenever I try to select multiple "text comments" within the comments section on the right of the window, the color palette greys out...

Any ideas?

 

Best,

Nick

Any ideas on that?

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 ,
Sep 19, 2022 Sep 19, 2022

There's no way to do it manually, because you need to select the actual text first to be able to edit its color, but it can be done using a script. For example, this code will change all the selected (Text) comments to red:

 

this.syncAnnotScan();
var annots = this.selectedAnnots;
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].textColor = color.red;
			annot.setProps({richContents: annotContents});
		}
	}
}

 

It's also possible to write a script to edit all Text comments in the file, selected or not, to red (or any other color, of course).

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 ,
Sep 19, 2022 Sep 19, 2022

try67, thanks a lot for your help! Could you just briefly explain how to implement the script as customized "Action" Feature (i.e. as a ".sequ" file) within Acrobat?

 

Best,

Nick

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 ,
Sep 19, 2022 Sep 19, 2022

You can't use it as an Action because that won't allow you to select comments first. You can run it from a Custom Command or a menu item, though.

If you want to apply this change to all Text comments in the file just change this line:

var annots = this.selectedAnnots;

To:

var annots = this.getAnnots();

Then you would be able to run it as a part of an Action.

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 ,
Sep 20, 2022 Sep 20, 2022
LATEST

"...thanks for your reply. Unfortunately..."

Sorry, I must have read sideways.


Acrobate du PDF, InDesigner et Photoshopographe
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