4 Replies Latest reply on Sep 9, 2009 6:48 AM by கற்பனை (Imagine)

    Export XHTML from InDesign

    கற்பனை (Imagine) Level 3

      Hi all,

       

      Any one help me to set the options in XHTML export by using javascript,  InDesign CS3, windows,

       

      var Options  = new XHTMLExportOptions();

       

      Options.formatted = true;   (Working)

       

      The General Option property within the XHTML Export  is to set it as Bullet and number = convert to text.  ????

       

      Regards,

      Nagaraj

        • 1. Re: Export XHTML from InDesign
          sudar1983_14 Level 2

          Hi,

           

          Use the following code u can get xhtml file.

           

           

          app.scriptPreferences.version = 5.0;

          var outputFile = File("C:\\test.html");

          var document = app.activeDocument;

           

          var scriptPath = Folder.startup + '/Scripts/Export as XHTML/';

          var scriptFile = File(scriptPath + 'XHTMLExport.jsxbin');

          if (scriptFile.exists) {

          scriptFile.open();

          var script = scriptFile.read();

          scriptFile.close();

          eval(script);

           

          var opts = new XHTMLExportOptions();

           

          opts.styleHandling = XHTMLExportOptions.extStyleSheet;

          opts.styleSheet = 'template.css';

           

          opts.formatted = true;

           

          app.exportForWebPreferences.gifOptionsInterlaced = true;

           

          var exporter = new XHTMLExporter(scriptFile);

           

          var success = exporter.doExport(document, undefined, opts, outputFile); // check the results:

          if(success)

          {

          /*if(exporter.outOfDateLinks.length > 0)

          {

          alert('Exporting ' + document.name + ' succeeded\nHowever ' + exporter.outOfDateLinks.length + ' links were out of date.');

          } */

          }

          else

          {

          alert('Exporting ' + document.name + ' failed with this error message:\n' + exporter.error.message);

          }

          }

           

           

          by

          Sudar.

          • 2. Re: Export XHTML from InDesign
            கற்பனை (Imagine) Level 3

            Hi sudar,

             

            Your script working well,  But my experience is, if the bullet and number list (Numbers) has been set in the style itself using the property bullet and numbering in the paragraph style.

             

            That bullets and numbers are missed out in the xhtml file.  How it should be fixed in the script?

             

            If we manually export xhtml file,  the properties of convert to text is available in Bullet and numbers tab.

             

            Any suggestion on this.....

            • 3. Re: Export XHTML from InDesign
              கற்பனை (Imagine) Level 3

              Hi guys,

               

              Any suggestion on this!!

              • 4. Re: Export XHTML from InDesign
                கற்பனை (Imagine) Level 3

                var myMenuAction = app.menuActions.item("$ID/Convert Style's Bullets and Numbering to Text").invoke();

                 

                 

                the above menuaction  will not working...  Is there any alternative solution for this....???