Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


Export Paragraph/character styles as css

New Here ,
Nov 11, 2021 Nov 11, 2021

Copy link to clipboard

Copied

Hi there,

I'm new to Indesign scripting development.

I have batch of grouping paragraph styles in my indd file. Is there anyway to export these existing styles into css?

After surfacing discussion, the first approach is directly export my indd file from Indesign console. Yet, the idGeneratedStyles.css doesn't cover all styles shown in indd file. 

The result shows as below:

 

截圖 2021-11-12 15.29.44.png

 

Any thought will be appreciated

TOPICS
Import and export, Print, Scripting, SDK

Views

101

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
community guidelines
Adobe Community Professional ,
Nov 12, 2021 Nov 12, 2021

Copy link to clipboard

Copied

Export as HTML or as EPUB, you will find your exported CSS there.

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
community guidelines
New Here ,
Nov 12, 2021 Nov 12, 2021

Copy link to clipboard

Copied

Thanks for response. 

I might not clearly describe my question. Besides we export css from Indesign, we have to ensure every paragraph/character style in Indd file will be retained.

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
community guidelines
Adobe Community Professional ,
Nov 12, 2021 Nov 12, 2021

Copy link to clipboard

Copied

CSS is not the mean to retain character and paragraph style to remain. Only InDesign and InCopy themselves will do it.

Tell us, what you want to accomplish?

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
community guidelines
New Here ,
Nov 16, 2021 Nov 16, 2021

Copy link to clipboard

Copied

The method I want is exporting paragraph/character style as css file. For example, in the indesign, we can add size, font, color within text. In addition, we can recognize size as font-size, font as font-family in css. Hence, there is a way to export paragraph/character style from Indesign, and convert there styles into css. 

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
community guidelines
Adobe Community Professional ,
Nov 16, 2021 Nov 16, 2021

Copy link to clipboard

Copied

Hm. A huge task.

There are about 330 property/value pairs for formatting text.

You have to write your own routines to do that.

The real problems come with nested formatting like nested line styles, nested styles and especially GREP styles.

Perhaps it could help to see into the XML code of snippet files and IDML files.

 

Regards,
Uwe Laubender

( ACP )

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
community guidelines
New Here ,
Nov 23, 2021 Nov 23, 2021

Copy link to clipboard

Copied

LATEST

Thanks for hint. For now, my solution is graping HTML style from IDML files.

On the other hand, nested line styles, nested styles might be faced in the future. 

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
community guidelines