8 Replies Latest reply: Feb 2, 2012 2:17 AM by lesavage RSS

    IDHostAdapter.getInstance().getXMPString(doc); returns null

    nandillo Community Member

      Hi,

      I'm trying to read and modify XMP data of a document, but i allways get a null value when reading it.

      Also,

      IDHostAdapter.getInstance().setXMPString(doc, updatedXMPString);

      doesn't work either;

       

       

        var app:Application = InDesign.app;

                                    var doc:Document = app.activeDocument;

                                    var idh:IDHostAdapter = IDHostAdapter.getInstance();

                                    var xmpString:String = idh.getXMPString(doc);

       

                                    var warpxmpContext:WARPXMPXMPContext = new WARPXMPXMPContext(xmpString);

                                    warpxmpContext.wARPXMP.publicacion = "periodico";

                                    var updatedXMPString:String =warpxmpContext.serializeToXML();

                                    IDHostAdapter.getInstance().setXMPString(doc, updatedXMPString);

                                    var xmpString2:String = IDHostAdapter.getInstance().getXMPString(doc);

       

       

      Any ideas?

       

      Thanks