4 Replies Latest reply on May 31, 2011 1:07 AM by Oviya...

    Export Epub [Generate css]

    Oviya... Level 1

      Hai Friends,

       

      I can export Epub file using InDesign Java script. But its not generating css file. By manual doing its providing css file.

      In css option Im choosing "use exiting css file".

       

      What is the option i have to enable for generate css file.

       

      Please clear my doubt friends...

       

      Thanks,

      Divya.

        • 1. Re: Export Epub [Generate css]
          Harbs. Level 6

          Version?

           

          Harbs

          • 2. Re: Export Epub [Generate css]
            Oviya... Level 1

            InDesign CS5....


            • 3. Re: Export Epub [Generate css]
              Oviya... Level 1

              Very urgent.. Plz help me for this issue

              • 4. Re: Export Epub [Generate css]
                Oviya... Level 1

                These lines of code i have tried to export Epub..

                 

                But it is not generate CSS...

                 

                 

                 

                function digitalEditionsExport()
                {

                    var outputFile = File("/Desktop/18042011/ABCD.epub");
                    var documentToExport = File("/Desktop/18042011/ABCD.indd");
                   
                    var source = app.open(documentToExport, false);       
                    var scriptFile = File("/Adobe InDesign CS5/Scripts/XHTML For Digital Editions/OEBExport.jsxbin");
                   
                    if (scriptFile.exists)
                    {
                        scriptFile.open();
                        var script = scriptFile.read();
                        scriptFile.close();       
                       
                        eval(script);   
                       
                        var xhtmlscript = File("/Adobe InDesign CS5/Scripts/Export As XHTML/XHTMLExport.jsxbin");
                        xhtmlscript.open();
                        var otherScript = xhtmlscript.read();
                        xhtmlscript.close();
                        eval(otherScript);
                   
                        var opts = new OEBExportOptions();
                       
                        opts.imageConversion = ImageConversion.automatic;
                        opts.gifOptionsPalette = GIFOptionsPalette.adaptivePalette;
                        opts.jpegOptionsQuality = JPEGOptionsQuality.medium;
                        opts.jpegOptionsFormat = JPEGOptionsFormat.baselineEncoding;
                       
                           
                        app.exportForWebPreferences.gifOptionsInterlaced = true;       
                          var exporter = new OEBExporter("/Adobe InDesign CS5/Scripts/XHTML For   Digital Editions/","ABCD", undefined);               
                        var success = exporter.doExport(source, opts, outputFile);
                               
                        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);
                        }       
                    }   
                    source.close(SaveOptions.no);
                    return success;
                }

                 

                var result = digitalEditionsExport();
                var message = "Digital Editions Export ";
                message += result?"did ":"did not ";
                message += "export the file.";
                message;