Skip navigation
Currently Being Moderated

CS4 InDesign: javascript export digital editons

Nov 26, 2009 6:53 AM

Hello


I need create a javascript to export a book (*.indb) to digital edition (*.epub).
The document book (*.indb) contains (*.indd) documents

Thanks in advance

 
Replies
  • Currently Being Moderated
    Nov 28, 2009 12:40 AM   in reply to Chus Fernanadez

    I would have expected that such a feature would be easy to automate. However, the digital edition export is not built like most of the rest of InDesign, which has generally been created in C++, with careful attention to expose virtually all features to automation (hence the existence of this forum).

     

    Instead, the functionality for digital edition export is realized via (compiled) scripts, i.e. those .jsxbin files in the Scripts > XHTML For Digital Editions folder where  Adobe InDesign CS4 is installed.

     

    So I guess that the functionality is not quite exposed to automation: you probably could call the .jsxbin files if you had documentation on how to call them. I don't see such documentation with InDesign, the scripting documentation, or the SDK.

     

    If this is truly the case it represents a serious flaw in InDesign and a violation of the fundamental principle of exposure to automation that we've seen since version 1.0. This could of course be rectified quite easily by Adobe, simply by giving us enough info about how to call these binary scripts; let us hope they do this soon.

     

    I hope I'm mistaken and someone can point to documentation on how to automate this, but I don't see it in the documentation, nor do I see answers to similar questions from a year ago.

     

    Thanks,

     

    Max

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 28, 2009 2:16 AM   in reply to Chus Fernanadez

    I found a script here (post #4): http://forums.adobe.com/message/1926464#1926464 I think it can be easily remade to make it work with CS4 and loop through all documents of a book.

     

    I can't do this right now since I will not have access to ID CS4 until Wednesday.

     

     

    Kasyan

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 28, 2009 10:27 AM   in reply to Kasyan Servetsky

    Yes we need to do something similar... however the XHTML export was provided as source and this is not. From your example:

    var opts = new XHTMLExportOptions();
    opts.styleHandling = XHTMLExportOptions.extStyleSheet;
    opts.styleSheet = 'template.css';
    ...
    

    We would have to guess at all the parameters like the  XHTMLExportOptions structure - they are documented for XHTML export but not this variant of it.

     

    You don't need to guess with CS4 for XHTML export: the source is available in the InDesign CS4 SDK available from http://www.adobe.com/devnet/indesign/sdk/eula_cs4.html

    Source for the XHTML export scripts is in source > public > components > xhtmlexport

     

    I asked Olav and he said that yes something like this approach would work and he will ask the team responsible to release the source and/or document how to use this script.

     

    It would appear they did the right thing with XHTML export but dropped the ball on digital editions.

     

    Note that we wouldn't want to do the iteration through files of a book; it would be preferable to simply be able to automate the equivalent of the book export option from the book panel.

     

    Max

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points