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

Get Fonts Styled Text in Document

Contributor ,
Dec 08, 2017 Dec 08, 2017

Copy link to clipboard

Copied

Hi,

     I need to get font styled text. It may be applied using character styles or formatting.  How can fetch those words from document??

     var fntStyles = app.activeDocument.stories.everyItem().textStyleRanges.everyItem().fontStyle;

     Using the above line can i get all fonts style which are applied in document?? both using styles and manually?

TOPICS
Scripting

Views

791

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 ,
Dec 08, 2017 Dec 08, 2017

Copy link to clipboard

Copied

There are some exceptions with GREP styles, but basically, yes.

For stories. That will not include footnotes and text in text cells of tables.

Regards,

Uwe

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
Contributor ,
Dec 08, 2017 Dec 08, 2017

Copy link to clipboard

Copied

Hi,

     I need to get from tables, footnote, any group box and etc... How can can i get those also?

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 ,
Dec 10, 2017 Dec 10, 2017

Copy link to clipboard

Copied

Hm…

I would start perhaps with a GREP find with a pattern like: \X+ where footnote search is enabled and then extract the textStyleRanges from the resulting texts by looping every single element of the result array.

Regards,
Uwe

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
Contributor ,
Dec 19, 2017 Dec 19, 2017

Copy link to clipboard

Copied

LATEST

Hi,

     Sorry for late reply...

     I have processed tables using table cell's paragraphs using textstyleranges. when I check, footnote and groups boxes are as normal textstyleranges. So used the  normal running text's code for footnote.

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