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

Export as html without css

Contributor ,
Jun 14, 2015 Jun 14, 2015

Hi,

   I am exporting InDesign file as HTML with no css option. If I use the option showingOptions is true, then the dialog HTML Export options dialog is open when running the script.  But I need to export InDesign file as html with no css and without dialog open… If anyone knows pls let me know....

Thanks in advance,

Sudha K

TOPICS
Scripting
1.1K
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
Community Expert ,
Jun 14, 2015 Jun 14, 2015

Like other export types, HTML export has its own export preferences:

app.documents[0].htmlExportPreferences.generateCascadeStyleSheet = false;

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
Contributor ,
Jun 15, 2015 Jun 15, 2015

Hi,

   Thanks for your reply.  its throwing error to me. Then i searched it in InDesign CS6 object model reference.

  Error : Object does not support the property or method 'generateCascadeStyleSheet'

   app.activeDocument.htmlExportPreferences.cssExportOption = StyleSheetExportOption.NONE;

Its working now.

- Sudha K

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 ,
Sep 29, 2017 Sep 29, 2017

I did not find this reference in jongware documentation...

I found cssExportOption, but it returns me an error.

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
Community Expert ,
Sep 30, 2017 Sep 30, 2017

You're probably looking in the wrong object model version. PDF, Epub, and HTML export options have changed between CS6 and CC2017 and are likely to change in future versions.

CS6:

htmlExportPreferences.cssExportOption = StyleSheetExportOption.EMBEDDED_CSS

CC2017:

htmlExportPreference.generateCascadeStyleSheet = true/false

htmlExportPreference.externalStyleSheets = <string>

and CC2015 may have different options as well. Always make sure you check the correct object model.

P.

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 ,
Sep 30, 2017 Sep 30, 2017
LATEST

Thank you so much, Peter!!!

It's clear now for me.

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