6 Replies Latest reply on Jan 11, 2010 7:07 PM by John Hawkinson

    One book two ways, can IDML help?

    fatr0y10

      Hi all,

       

      (admission, I'm not an InDesign user so apologies if my question doesn't make sense)

       

      I have a single source of content that needs to be rendered twice (as printer ready PDFs) with a different appearance in each instance. What I'm curious about is if IDML can be used to facilitate this change.  Here's how I'm imagining this might work:

       

      1) a designer/comp lays out and composes book pages with the end result of pages appearing with design #1

      2) that file is then exported as IDML.

      3) changes are made to the IDML

      4) altered IDML file is imported back into InDesign with the end result of pages appearing with design #2.

       

      Now the questions:

       

      a) Is this possible?

      b) If so, is the basic workflow I've described above even remotely close to reality?

      c) I'm assuming that if a and b are true then becaue IDML is XML the changes could also be made by a script. Is this assumption correct?

      d) If c is also true any recommendations for that script?

       

      And, finally, even if this is do-able, is it a good idea (i.e. not incredibly labor intensive)

       

      Thanks in advance for any info anyone has on this.

        • 1. Re: One book two ways, can IDML help?
          AdobeScripts Level 3

          fatr0y10 wrote:

           

          I have a single source of content that needs to be rendered twice (as printer ready PDFs) with a different appearance in each instance.

           

          What is your DataSource ? Do you need to change only few "places" in text - like name&address in letter header or whole contents is in DataSource ?

           

          robin

          www.adobescripts.com

          • 2. Re: One book two ways, can IDML help?
            [Jongware] Most Valuable Participant
            function(){return A.apply(null,[this].concat($A(arguments)))}

            c) I'm assuming that if a and b are true then becaue IDML is XML the changes could also be made by a script. Is this assumption correct?

             

             

            Not per se.

            IDML is an export format -- you tell InDesign to export as such, and it does. Nothing to script here (except doing the export itself). The IDML file only "lives" on the hard disk, and reloading it into ID makes it a proper InDesign document again.

             

            On the other hand, as long as the file is active inside ID, you can make a script do (almost) everything you want.

             

            Theoretically, you can write a script that "reads" the IDML file [*], manipulates its contents, then "writes" it back -- but that has nothing to do with IDML, as you can do this with any file at all. InDesign is not "aware" of the internal structure of an IDML file, and the scripting interface has no useful functions to work with it.

             

            [*] Which is not as straightforward as it sounds -- one single IDML file consists of a PKZipped structure of several different files, and the first thing to do should be finding a PKZip compatible unpack library, written in Javascript.

            • 3. Re: One book two ways, can IDML help?
              John Hawkinson Level 5

              Jongware, I think the original proposal was to script the changes to the IDML in some other scripting language (e.g. perl, python, etc.), rather than to do so with InDesign scripting.

               

              The wisdom of this approach varies a lot. Almost certainly, any manipulation to InDesign documents is easier with InDesign scripting running live under InDesign than dealing with the complex IDML file format. But if a lot of work needs to be done on the file requiring integration with external software and tools, then it might be the way to go.

               

              So, really, we need more information. What kinds of changes are desired to the book? Give some examples?

              • 4. Re: One book two ways, can IDML help?
                Dirk Becker  Level 4

                Jongware,

                 

                for IDML / ZIP files you can use app.packageUCF() and app.unpackageUCF()

                 

                Dirk

                • 5. Re: One book two ways, can IDML help?
                  fatr0y10 Level 1

                  Thanks for the response.

                   

                  When I originally posted the question I was only thinking about changes to design/appearance (color, font, etc), but other changes could include moving content around, re-naming part or chapter titles, re-ordering parts or chapters, or removing or adding content.  I think it would be rare that all of these changes would be made and more likely that the design changes would be made and maybe one or two of types of content changes might be made.

                   

                  Thanks again.

                  • 6. Re: One book two ways, can IDML help?
                    John Hawkinson Level 5

                    That definitely sounds like it is best done scripting InDesign directly (JavaScript, Applescript, or VBScript).