Nov 4, 2011 12:24 PM
IDHostAdapter.getInstance().getXMPString(doc); returns null
-
Like (0)
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
I've never used IDHostAdapter.getXMPString() or IDHostAdapter.setXMPString()
I would use Document.metadataPreferences instead...
Harbs
Hi,
We have an updated version of the InDesign Host Adapter library available for download:
http://cssdk.host.adobe.com/sdk/1.5/patch/id_hostadapter_mac.zip
In terms of examples, please look at the AssetFragger CS extension example which shows adding/modifying XMP metadata using XMP Namespace Designer and InDesign Host Adapter library. This extension is available in CS Extension Builder under File > Import > CS Extension Builder > Samples. For further information, please refer to http://www.adobe.com/devnet/creativesuite/samples.html
Kind regards,
Lea
From: Adobe Forums <forums@adobe.com<mailto:forums@adobe.com>>
Reply-To: "jive-686358050-8wui-2-2dxrb@mail.forums.adobe.com<mailto:jive-686358050-8wui-2-2dxrb@mail.forums.adobe.com>" <jive-686358050-8wui-2-2dxrb@mail.forums.adobe.com<mailto:jive-686358050-8wui-2-2dxrb@mail.forums.adobe.com>>
Date: Sat, 5 Nov 2011 19:45:40 +0000
To: lab user <lesavage@adobe.com<mailto:lesavage@adobe.com>>
Subject: Re: IDHostAdapter.getInstance().getXMPString(doc); returns null IDHostAdapter.getInstance().getXMPString(doc); returns null
Re: IDHostAdapter.getInstance().getXMPString(doc); returns null
created by Harbs.<http://forums.adobe.com/people/Harbs.> in Creative Suite Extension Builder - View the full discussion<http://forums.adobe.com/message/4009511#4009511
Hi Harbs,
That's what I'm using in my project
But we have a legacy xmp structure that I couldn't replicate with Doc.metadaPreferences.setProperty
Also It has it's own namespace
I ended writing the xmp to a file and then loading it with doc.metadataPreferences.append
Im looking forward to use the IdHostAdapter to manipulate the xmp directly
Thanks for your answer.
Hi Savage82,
I notice that this plugin has the same version number (7.0.0) that the one I have, but the size is different
I'll try it and I'll let you know
Didn't work... I still get "null"...
I tested it with the AssetFragger Example
Thanks
I'm not sure why that was a problem.
You can use any namespace you want with the getProperty() and setProperty() methods.
I've done this with no issues...
Harbs
Hi Harbs
I couldn't create a new namespace...
And the structure had nested "seq" elements
I didn't find a way to do this with setProperty and/or createContainer
nandillo
Hi Lea,
Do you have the updated version of the IdHostAdapter plugin for InDesign CS5 (7.0)
The one I downloaded from the link you provided works fine with CS5.5, but CS5 cannot load it.
Thanks,
nandillo
Hi Nandillo,
The native component of the IDHostAdapter only works with CS5.5. We do not offer an equivalent for CS5.
However, please note that this does not affect the events feature which will work in both CS5 and CS5.5.
Kind regards,
Lea
North America
Europe, Middle East and Africa
Asia Pacific
Copyright © 2011 Adobe Systems Incorporated. All rights reserved.
Use of this website signifies your agreement to the Terms of Use and Online Privacy Policy (updated 07-14-2009).