12 Replies Latest reply on Jul 29, 2015 11:50 PM by Pickory

    how to create IDML using javascript in third party app

    davidr83890448

      I'm a software developer creating a custom application that must output to InDesign.

       

      My application is written in javascript. We are sending IDML including: Story Headline, Story Content, Pictures with cut-lines.

       

      I've read the documentation IDML File Format Specification 7.0. It would greatly help me to get some answers about what I don't know.

       

      I tried to find an Adobe javascript tool to generate what I need but did not locate the scripts/tools directory.

       

      What is the contents of MIMETYPE? I know what mimetype is and have used it to encode email bodies. But what is the format/content of MIMETYPE in the IDML file?

       

      Is the entire contents of the zip archive encoded with mimetype or just the story contents, pictures, etc?

       

      Where do we put pictures (.jpg) in an IDML file?

      How do we associate cut-lines and headlines with photos and stories?

       

      We are outputting to CS6.

       

      Thanks for your help!

       

      In a zip archive will be:

      MIMETYPE

      designmap.xml

       

      <?xmlversion="1.0"encoding="utf-8"?>

      <?aidstyle="50"type="document"readerVersion="6.0"featureSet="257"?>

      <Document

          xmlns:idPkg="http://ns.adobe.com/AdobeInDesign/idml/1.0/packaging"

          DOMVersion="7.0"Self="d">

        <idPkg:Spreadsrc="Spreads/Spread_spread1.xml"/>

        <idPkg:Storysrc="Stories/Story_story1.xml"/>

      </Document>

       

       

      (and folders as necessary)

      Stories

       

      <?xmlversion="1.0"encoding="utf-8"?>

      <idPkg:Storyxmlns:idPkg="http://ns.adobe.com/AdobeInDesign/idml/1.0/packaging"

          DOMVersion="7.0">

        <StorySelf="story1">

           <Content>Encoded story content?</Content>

        </Story>

        <idPkg:Storysrc="Stories/Story_story1.xml"/>

      </idPkg:Story>

       

       

      Spreads

      <?xmlversion="1.0"encoding="utf-8"?>

      <idPkg:Spreadxmlns:idPkg="http://ns.adobe.com/AdobeInDesign/idml/1.0/packaging"

          DOMVersion="7.0">

        <SpreadSelf="spread_1"PageCount="1">

           <TextFrameSelf="textframe1"ParentStory="story1"ContentType="TextType"

                   ItemTransform="1001-612-396">

               <Properties>

                   <PathGeometry>

                       <GeometryPathPathOpen="false">

                           <PathPointArray>

                               <PathPointAnchor="3636"LeftDirection="3636"

                                   RightDirection="3636"/>

                               <PathPointAnchor="36186"LeftDirection="36186"

                                   RightDirection="36186"/>

                               <PathPointAnchor="172186"LeftDirection="172186"

                                   RightDirection="172186"/>

                               <PathPointAnchor="17236"LeftDirection="17236"

                                   RightDirection="17236"/>

                               </PathPointArray>

                           </GeometryPath>

                       </PathGeometry>

                   </Properties>

               </TextFrame>

        </Spread>

      </idPkg:Spread>

       

      David R.