2 Replies Latest reply on Jul 3, 2013 2:27 AM by Kai Rübsamen

    EPUB - not able to add cover images

    Gejaraja Level 1

      Hi All,

       

      I'm unable to add cover images thro' scripting while generating EPUB, but while doing manually it looks fine. Please confirm.

       

      Thanks,

       

      Praveen

        • 1. Re: EPUB - not able to add cover images
          Gejaraja Level 1

          I'm using the below code to add the cover image:

           

          var myDoc = app.activeDocument;
          var myDocName = myDoc.name;
          myDocName = myDocName.replace(".indd",".epub");

          myDoc.epubExportPreferences.epubCover = EpubCover.EXTERNAL_IMAGE;
          myDoc.epubExportPreferences.coverImageFile = '/E/9780470671955.jpg';
          app.jpegExportPreferences.jpegQuality = JPEGOptionsQuality.MAXIMUM;

           

          Could anyone please check and confirm?

          • 2. Re: EPUB - not able to add cover images
            Kai Rübsamen Adobe Community Professional

            Hi Praveen,

             

            I’m not a scripter, but it seems, that only the full path with ":" instead of "/" is honored on a Mac?!

             

            Steps to reproduce:

             

            1. Import your image on a page in InDesign and select it

            2. app.selection[0].graphics[0].itemLink.filePath; // gives you the full path of your image

            3. myDoc.epubExportPreferences.coverImageFile = 'MBook:Users:mbadmin:Desktop:E:Cover.jpg'; // works for me

             

            best

            Kai