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

How to export all styles of a text to a file?

Explorer ,
Dec 21, 2023 Dec 21, 2023

Copy link to clipboard

Copied

Is there any way to export all styles  (font size, color, alignment, stroke width, line height,...) of a text to a file via jsx? I want to use this text styles to the texts of another Ai file.

TOPICS
How-to , Import and export , Print and publish , Scripting , SDK , Tools

Views

544

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
Adobe
Community Expert ,
Dec 22, 2023 Dec 22, 2023

Copy link to clipboard

Copied

If that means character styles or paragraph styles, you can save the document as just an Illustrator file and load it with importCharacterStyles or importParagraphStyles.

// import
var doc = app.documents[0] ;
var aiFile = new File('~/Desktop/style.ai') ;
doc.importCharacterStyles(aiFile) ;
doc.importParagraphStyles(aiFile) ;

 

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
Explorer ,
Dec 24, 2023 Dec 24, 2023

Copy link to clipboard

Copied

How to export character styles or paragraph styles in Illustrator?  ui or jsx?

test3.ai 

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 24, 2023 Dec 24, 2023

Copy link to clipboard

Copied

LATEST

Simply export the Illustrator file containing character styles and paragraph styles as an ai file with saveAs. It can be achieved both in ui and jsx.

 

Or do you mean that you have not defined them as character styles or paragraph styles, but just specified fonts, sizes, colors, etc.?

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