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

Action to change color (Black to DK Red) and from Regular to BOLD ??

New Here ,
May 11, 2017 May 11, 2017

Copy link to clipboard

Copied

Hi folks,

There are documents we annotate after receiving from our campuses where we typically manually change the Text Font Color from our default (black) to Dark Red, and also from regular to Bold faced.

Does anyone know how to set up an "action"  (or macro equivalent) to automate this task... as well as the reverse ?

Please advise when you get a moment.

Many thanks & till later,

Rick Stockstill

North East Independent School District

San Antonio, TX

TOPICS
Edit and convert PDFs

Views

248

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 ,
May 11, 2017 May 11, 2017

Copy link to clipboard

Copied

Just to be clear, are you referring to the FreeText commenting tool, or are you adding text in another way?

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
New Here ,
May 12, 2017 May 12, 2017

Copy link to clipboard

Copied

Hi again,

FreeText commenting tool... represented by the little rectangular icon with the letter  "T" in the middle of same.

There are specific documents that require the Dark Red font, so I am always changing from the Default of Black to the Dark Red...no big deal if done once/day or so... but this happens numerous times each day.  In Excel, I'd simply record a macro and execute with something like CTRL+J... and am looking for an equivalent capability for Adobe Acrobat Pro.

Much appreciated & till later,

Rick S.

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 ,
May 12, 2017 May 12, 2017

Copy link to clipboard

Copied

This code will convert all of the texts in these comments to a dark red (you can play around with the exact RGB value, if you wish) and make them bold:

this.syncAnnotScan();

var annots = this.getAnnots();

if (annots!=null && annots.length!=0) {

    for (var i in annots) {

        var a = annots;

        if (a.type=="FreeText") {

            var spans = a.richContents;

            for (var j in spans) {

                spans.textColor = ["RGB", 0.8, 0, 0];

                spans.fontWeight = 700;

            }

            a.richContents = spans;

        }

    }

}

You can execute this code from the JS-Console, or even from a menu button that is added to the application, but that would require adjusting it a bit and putting it in a script file that's installed in a local folder.

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
New Here ,
May 12, 2017 May 12, 2017

Copy link to clipboard

Copied

Hi again,

Very much appreciated !!   I'll need to tinker with how to effect the execution steps you've mentioned... but, now at least I have a goal to pursue.

I'll be back if I get stuck.  Again, your help very much appreciated !   :- )

Till later,

Rick S.

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 ,
May 12, 2017 May 12, 2017

Copy link to clipboard

Copied

LATEST

You can also assign it to a MouseUp event of a button form field, by the

way...

On Fri, May 12, 2017 at 2:36 PM, ricks23678806 <forums_noreply@adobe.com>

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