Skip to main content
Participant
September 19, 2022
Answered

Change font color of multiple "text comments" at once

  • September 19, 2022
  • 4 replies
  • 3791 views

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

This topic has been closed for replies.
Correct answer try67

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.

4 replies

JR Boulay
Community Expert
Community Expert
September 20, 2022

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

Sorry, I must have read sideways.

Acrobate du PDF, InDesigner et Photoshopographe
try67
Community Expert
Community Expert
September 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).

Nick_0815Author
Participant
September 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

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
September 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.

Nick_0815Author
Participant
September 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?

JR Boulay
Community Expert
Community Expert
September 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.

 

Acrobate du PDF, InDesigner et Photoshopographe