3 Replies Latest reply on Dec 21, 2009 7:11 AM by lanejd

    Indesign JS -- XMP access without Bridge?

    lanejd

      Is there a way to r/w XMP metadata in an InDesign script without having Bridge open?

       

      I have read through a lot of the documentation, but the only way I am seeing to change metadata is by opening Bridge and loading the XMP library from there.

       

      Can someone point me to any documentation about this other than the current Javascript Tools Guide?

      Is there an InDesign class or library that can read and write XMP?

      Is there a way to load the XMP library without actually having Bridge run?

      Do I have to have that library to edit XMP data?

      Can I move/copy the library somewhere else, load it, and have it still work the same way?

       

      If anyone has any ideas, that would be great. I am pretty new to the scripting world and I am still learning.

        • 1. Re: Indesign JS -- XMP access without Bridge?
          Olav Martin Kvern Level 3

          Hi lanejd,

           

          You can use InDesign's own XMP objects/properties/methods. (History note: we developed our own XMP tools early on, before the ExtendScript XMP library was available.) Do you want to change the metadata for an InDesign file, or look at the metadata for an imported element in an InDesign document?

           

          If the former, you use the metadataPreferences object on the document itself (several examples in the Documents chapter of the Scripting Guide demonstrate the use of this object); if the latter, you use the metadataPreferences object on the itemLink element of the imported graphic.

           

          By design, InDesign can't change the XMP of an imported graphic, so you'd still have to do that outside InDesign.

           

          Thanks,

           

          Ole

          1 person found this helpful
          • 2. Re: Indesign JS -- XMP access without Bridge?
            Marc Autret Level 4

            lanejd wrote:

             

            Is there a way to r/w XMP metadata in an InDesign script without having Bridge open? (...)

             

            Yep, the XMPScript API is separate from the Bridge DOM, so InDesign is able to load itself the library -- new ExternalObject('lib:AdobeXMPScript') -- and to process directly the XMP data. I gave a sample code here: http://forums.adobe.com/message/2225492#2225492 (works in ID CS4).

             

            @+

            Marc -- http://www.indiscripts.com

            • 3. Re: Indesign JS -- XMP access without Bridge?
              lanejd Level 1

              Thanks. It's funny, I had actually already come across that exact post of yours while researching this question.

               

              Do you know of any documentation (other than the JavaScript Tools Guide) that I can read to learn more about how to use the XMP API? I am having a hard time wrapping my head around the syntax.

               

              Thanks again.