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
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;
...
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.
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.
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?
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).
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
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.
Copy link to clipboard
Copied
"...thanks for your reply. Unfortunately..."
Sorry, I must have read sideways.