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

Change font color of multiple "text comments" at once

Community Beginner ,
Sep 18, 2022 Sep 18, 2022

Copy link to clipboard

Copied

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

Views

1.4K

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 2 Correct answers

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;
	
...

Votes

Translate

Translate
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.

Votes

Translate

Translate
Community Expert ,
Sep 19, 2022 Sep 19, 2022

Copy link to clipboard

Copied

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

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

Copy link to clipboard

Copied

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?

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

Copy link to clipboard

Copied

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).

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

Copy link to clipboard

Copied

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

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

Copy link to clipboard

Copied

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.

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

Copy link to clipboard

Copied

LATEST

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

Sorry, I must have read sideways.

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