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

Reading paragrah styles export details with javascript.

Explorer ,
Nov 10, 2014 Nov 10, 2014

Hi everyone,

I want to be able to loop (with javascript)  through every pstyle on my doc and read the export details to write a css class for each with this information.

I went through the IDCC DOM (InDesign ExtendScript API (10.0)) but couldnt find how to access that information.

Screen Shot 2014-11-10 at 4.44.46 PM.png

TOPICS
Scripting
620
Translate
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
Enthusiast ,
Nov 11, 2014 Nov 11, 2014

The export details are only a summary. Those attributes and values will be created during the export and not live in InDesign.

" and read the export details to write a css class for each with this information"

What does that mean?

InDesign writes the css for you. But if you want to apply class-names via scripting, this is possible, but not really faster, as if you choose Edit > All Exporttags.

– Kai

Translate
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 ,
Nov 11, 2014 Nov 11, 2014

read that summary for each paragraph style and write a class in a css file for each paragraph style

Translate
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 ,
Nov 11, 2014 Nov 11, 2014

I mean, if that summary is there already without having to export anything, it should be available to access it through scripting

Translate
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
Enthusiast ,
Nov 11, 2014 Nov 11, 2014

I don’t think so! Nevertheless: If you interested in bad CSS, export your file, crack up your epub and copy the css.

Translate
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 ,
Nov 11, 2014 Nov 11, 2014

that is exactly what i dont want.

Translate
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
Enthusiast ,
Nov 11, 2014 Nov 11, 2014

Good to here 😉

Maybe it is not clear, what you are tryin to achieve here!

First, those options are created only during the export and are not available via scripting.

What I normally do:

1. Map the styles by hand or via scripting

2. Emit the InDesign CSS on paragraph level or during the export

3. Include my own CSS

Translate
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 ,
Nov 11, 2014 Nov 11, 2014
LATEST

yeah, but they are already displayed there, so they exist somehow. i just thought 'if they're there they have to be accesible via script'

Translate
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 ,
Nov 11, 2014 Nov 11, 2014

Also, the question is can i access that information? not IS IT FASTER THAN JUST EXPORTING? just exporting it wont mean anything for what im trying to accomplish.

Translate
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