Highlighted

Update Style of CharFmt

New Here ,
Jul 16, 2018

Copy link to clipboard

Copied

Hi All,

It is easily possible to change with Pod "Character Designer" a property of a character format.
For example, in a template file of a FM book, when a character style is selected, the change of one property, e.g. color, could be updated with "Update Style" button when the cursor position is not in a particular paragraph of a body page. Next action will be to either retain or remove overrides.

With javascript code it is possible to change as well color red of a character format to black.

var charfmt = doc.GetNamedCharFmt(varcol);

        // var chrfmt = doc.GetNamedObject(Constants.FO_ChrFmt, varcol);

        if (charfmt.ObjectValid() == true)

            {

                            charfmt.Color = "Black";

      }

But is it also possible to use a javascript function equivalent to "Update Style, "Retain Overrides" or "Remove Overrrides" buttons?

Marc

TOPICS
Scripting

Views

183

Likes

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

Update Style of CharFmt

New Here ,
Jul 16, 2018

Copy link to clipboard

Copied

Hi All,

It is easily possible to change with Pod "Character Designer" a property of a character format.
For example, in a template file of a FM book, when a character style is selected, the change of one property, e.g. color, could be updated with "Update Style" button when the cursor position is not in a particular paragraph of a body page. Next action will be to either retain or remove overrides.

With javascript code it is possible to change as well color red of a character format to black.

var charfmt = doc.GetNamedCharFmt(varcol);

        // var chrfmt = doc.GetNamedObject(Constants.FO_ChrFmt, varcol);

        if (charfmt.ObjectValid() == true)

            {

                            charfmt.Color = "Black";

      }

But is it also possible to use a javascript function equivalent to "Update Style, "Retain Overrides" or "Remove Overrrides" buttons?

Marc

TOPICS
Scripting

Views

184

Likes

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
Jul 16, 2018 0
Adobe Community Professional ,
Jul 16, 2018

Copy link to clipboard

Copied

You can use the following code to update all occurrences of the Character Format in the document and remove overrides:

doc.SimpleImportFormats (doc, Constants.FF_UFF_FONT | Constants.FF_UFF_REMOVE_EXCEPTIONS);

-Rick

Likes

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
Reply
Loading...
Jul 16, 2018 0