How to get XMP MetaData as an XML String in a process?

Hi there,
I have a process where I would like to export a documents XMP MetaData, manipulate the XMP MetaData and then import the MetaData again to the document.
I thougt first I will use the service Name "XMPUtilityService" with the Service Operation "Export XMP" to export the XMP MetaData as a document.
Hoewer I am not sure how to manipulate the output document from the Export XMP service.
When I print out the document.toString() in a execute Script Service I get the following:
<document state="active" senderVersion="0" persistent="false" senderPersistent="false" passivated="false" senderPassivated="false" deserialized="false" senderHostId="null" callbackId="0" senderCallbackId="0" callbackRef="null" isLocalizable="true" isTransactionBound="false" defaultDisposalTimeout="600" disposalTimeout="600" maxInlineSize="65536" defaultMaxInlineSize="65536" inlineSize="3440" contentType="null" length="-1"><cacheId/><localBackendId/><globalBackendId/><senderLocalBackendId/><senderGl obalBackendId/><inline><?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="A...</inline><senderPullServantJndiName/><attributes/></document>
Actually I expected something like this:
<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.0-jc006 DEBUG-1.0, 2009 Jun 23 11:07:21-PDT">
   <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
      <rdf:Description rdf:about=""
            xmlns:pdf="http://ns.adobe.com/pdf/1.3/">
         <pdf:Producer>Adobe LiveCycle PDF Generator ES2</pdf:Producer>
      </rdf:Description>
      <rdf:Description rdf:about=""
            xmlns:xmp="http://ns.adobe.com/xap/1.0/">
         <xmp:ModifyDate>2010-04-20T20:43:59+02:00</xmp:ModifyDate>
         <xmp:MetadataDate>2010-04-20T20:43:59+02:00</xmp:MetadataDate>
      </rdf:Description>
      <rdf:Description rdf:about=""
            xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/">
         <xmpMM:DocumentID>uuid:0cf2c6c6-2fba-2b39-5fb6-33ad8ccf58aa</xmpMM:DocumentID>
         <xmpMM:InstanceID>uuid:187bc5a2-acb0-2fa9-711d-33ad8ccf58aa</xmpMM:InstanceID>
      </rdf:Description>
   </rdf:RDF>
</x:xmpmeta>
<?xpacket end="w"?>
What do I need to do to get the XMPMeta data as an XML String from a document within a process?
Thanks in advance!
Paul

Hi,
thanks for the answer.
I know that I can retrieve the XMPUtilityMetadata object, but this object provides only access to a few information suche as creator, subject, producer, etc.
However I would like to retrieve the whole XML String of the XMP Metadata.
How is this possible?
Thanks.
Paul

Similar Messages

  • How to get the metadata in Designer?

    In Acrobat, I can get the metadata by "this.metadata".
    The Designer's Help  said: use "xfa.form.desc" to instead of "this.metadata".
    The "desc" has a method "metadata(Integer para)" to return the metadata's info.
    I use the code "xfa.form.desc.metadata(0)" in designer.
    But alert the error "GeneralError :Operation failed".
    Who can tell me how  to get the metadata in Designer?
    Thanks.

    Thank you,radzmar.
    I use the "xfa.host.messageBox(""+xfa.event.target.metadata);" in a button's clickEvent.
    But the error is same.
    My target is:
    Now,I have a blank PDF create by Designer.
    Only one button in this PDF.
    When I click the button,then show the metadate'info for me.
    My code is:
    try{
    var tDesc=xfa.form.desc;
        xfa.host.messageBox(""+tDesc.metadata(0),"",3);
    }catch(e){
    xfa.host.messageBox(""+e);
    But it is incorrect;
    I want to get a simple about get metadata info.
    the metadata info like:
    <rdf:Description xmlns:xmp="http://ns.adobe.com/xap/1.0/" rdf:about="">
             <xmp:MetadataDate>2010-11-18T07:37:45Z</xmp:MetadataDate>
             <xmp:CreatorTool>Adobe LiveCycle Designer ES 9.0</xmp:CreatorTool>
             <xmp:ModifyDate>2010-11-18T13:14:40+08:00</xmp:ModifyDate>
             <xmp:CreateDate>2010-11-18T11:25:05+08:00</xmp:CreateDate>
          </rdf:Description>
          <rdf:Description xmlns:pdf="http://ns.adobe.com/pdf/1.3/" rdf:about="">
             <pdf:Producer>Adobe LiveCycle Designer ES 9.0</pdf:Producer>
          </rdf:Description>

  • How to import XMP metadata in pdf

    Could you please explain me, how to import XMP metadata in pdf file through "Live Cycle ES"?

    Yes, with LiveCycle ES (almost) all services can be invoked from any of the available endpoints (watch folder, EJB, WebService, etc).
    In this case since the ImportXMP requires two input files (the PDF and the XMP) you will need to drop a directory containing both of your files into the watch folder (not the individual files). This is because several requests can be dropped into the watch folder at the same time and without the sub directories LiveCycle couldn't tell what XMP when with what PDF.
    A com.adobe.idp.Document - AKA: Document - object is one of the common object types used across all LiveCycle products. When you deal with PDFs and many other binary file objects they are stored a Document object. It is more important that you know this when using Workbench, web services or the Java API.
    You should have a look at the documentation at: http://livedocs.adobe.com/livecycle/8.2/programLC/programmer/help/001553.html

  • How to import XMP Metadata?

    Could you please explain me, how to import XMP metadata in pdf file through "Live Cycle ES"?

    > Please give any samples.
    As I said, the samples are in the API Reference. All you have to do is look them up.

  • How to read XMP metadata of an indd file using Actionscript

    Hi All,
    I am trying to read XMP metadata of an indd file using CS Extension Builder in Flash Builder 4.5.
    The documentation has many class like XMPmeta, XMPStruct, etc.
    I have got the currently opened document in InDesign as follows:
    var myDoc:Document = InDesign.app.activeDocument();
    And a new XMPmeta object is created as follows:
    var myXMP:XMPMeta = new XMPMeta();
    How to initialize document's xmp metadata in the XMPMeta object? Or is there any other way to get the XMP metadata of currently opened document in InDesign?

    I have found that the XMP data of an InDesign document can be retrieved in actionscript as follows:
    InDesign.app.activeDocument.metadataPreferences
    This returns the MetadataPreference object.
    But I am not able to iterate each namespace in the xmp. There isn't any XMPFile class which allows me to serialize the object to xml file so that I can iterate all elements in the XMP.
    I could not relate class like XMPMeta, XMPProp, etc. with the MetaDataPreference class. So, how to obtain the entire xmp packet from the MetadataPreference object?
    Can anyone shed light on this?

  • [CS3 JS] How to force XMP metadata update for a thumbnail?

    Hi Folks,
    In a JavaScript in Bridge CS3, I'm updating a value in the XMP metadata for a Thumbnail. Later in the script I want to read the updated XMP metadata information from the Thumbnail, but often Bridge hasn't updated the metadata by the time I read it. In other words, my script reads the value prior to the update. I'm guessing there's a caching issue going on.
    I'm new to Bridge scripting, and I am hoping someone here can offer suggestions on how I can (or, even *if* I can) force Bridge to update the XMP metadata cache for a file so that when I read it later in the script it will reflect the recent changes. I've tried using Thumbnail.refresh(), but that doesn't seem to do the trick. I don't mind a slower script, I just want to be able to read the correct value.
    Thanks in advance for any help!
    -- Jim

    Hi David,
    I'm running this script on a MacBook Pro, 2.5GHz, 4GB RAM.
    Here is a sample JSX that shows the issue I'm having:
    #target "bridge-2.0"
    main();
    function main() {
        if( xmpLib == undefined ) {
            var pathToLib = Folder.startup.fsName + "/AdobeXMPScript.framework";
            var libfile = new File( pathToLib );
            var xmpLib = new ExternalObject("lib:" + pathToLib );
        var myValue = "Headline Test";
        var myFilePath = "~/Desktop/TestFile.tif";
        var curHeadlineStr = XMPGetHeadline(myFilePath);
        $.writeln("Headline value: \"" +  curHeadlineStr + "\"");
        XMPWriteHeadline(myFilePath, myValue);
        // *** I would like to refresh the cache here ***
        curHeadlineStr = XMPGetHeadline(myFilePath);
        $.writeln("Headline value: \"" +  curHeadlineStr + "\"");
    function XMPGetHeadline(theFilePath) {
        var thumb = new Thumbnail(File (theFilePath) );
        md = thumb.synchronousMetadata;   
        xmp = new XMPMeta(md.serialize());
        var myHeadlineXMPProp = xmp.getProperty
            (XMPConst.NS_PHOTOSHOP, "Headline", XMPConst.STRING);
        return myHeadlineXMPProp;
    function XMPWriteHeadline(theFilePath, theTextStr){
        var thumb = new Thumbnail(File (theFilePath) );
        md = thumb.synchronousMetadata;   
        xmp = new XMPMeta(md.serialize());
        var myOrigHeadlineXMPProp = xmp.getProperty
            (XMPConst.NS_PHOTOSHOP, "Headline", XMPConst.STRING);
        xmp.deleteProperty(XMPConst.NS_PHOTOSHOP, "Headline");
        xmp.setProperty(XMPConst.NS_PHOTOSHOP, "Headline", theTextStr, 0, XMPConst.STRING);
        var updatedPacket = xmp.serialize
            (XMPConst.SERIALIZE_OMIT_PACKET_WRAPPER | XMPConst.SERIALIZE_USE_COMPACT_FORMAT);
        thumb.metadata = new Metadata(updatedPacket);
    To run this script, in main(), set the myFilePath variable to the path of a file that has an "IPTC Code" "Headline" property.
    This script, when run, sets the "Headline" property value to the value of myValue. After runing the script for the first time, take a look at the console log. You should see that Headline value displayed does not change between the two console entries. My log looks like this after the first run:
      Headline value: "undefined"
      Headline value: "undefined"
    The thing is, the second entry in the console listing, above, was created after the Headline value was set by XMPWriteHeadline(). The two values should be different between the two console entries.
    If you run the script a second time against the same file, you will see that the Headline value does contain the value that was written in the first run of the script--it just took some time to update the cache, I'm guessing. Here's the second run's log:
      Headline value: "Headline Test"
       Headline value: "Headline Test"
    So, what I'm looking for is a way to insert code (where the comment line "//*** I would like to refresh the cache here ***" appears), to force Bridge CS3 to refresh its cache so that when I call XMPGetHeadline() after calling XMPWriteHeadline(), the Headline value will return the value that was just written.
    I hope this is clear enough...
    Thanks!!!!
    -- Jim

  • How to get the encoding of a XML file ...

    Hi,
    How do you get the encoding of a XML file?
    For example,
    <?xml version="1.0" encoding="SJIS"?>
    I am trying to retrieve the above encoding="SJIS", but I can't seem to locate the API for doing so.
    Thanks in advance for any help,
    Eric

    Hi ddossot,
    Thanks for your suggestion.
    However, the xerces.jar file that comes with my old tomcat server is an old version and thus, the getEncoding method is not even present in the DocumentImpl class. The option to update to a newer version of tomcat and xerces is not available. What a pity... :-(
    Well, I just have to try to find a way around. Worst case scenario, parse the first line in the xml file myself.
    Regards,
    Eric

  • How to get the  page count in XML Publisher Report

    Hi Team,
    I am generating one xml report. I want to get the total Page count in XML publisher report. This page count is depends on the input Parameters at runtime. How to get this total page count on the runtime dynamically.
    Best Regards
    Sri

    there is some seeded variable available please read xml publisher developer user guide

  • C++ code to get XMP metadata from pdf files ??

    Hi,
    I am new to this field and now I have to write a C++ code which will read the XMP metadata from any pdf files. Could anyone please tell me how to do that or where to start? Is there any sample code available for that?
    I am reading the Programmer's guide and XMP specification to have the whole idea.
    I really appriciate your help. Thanks in advance.
    Regards,
    Suranjit Paul

    Hi,
    The same code for reading other formats will go for Pdf too.
    Only difference is while reading PDF it is not calling any smart filters.

  • How to populate BusinessObjects metadata repository with .xml data?

    Can we populate BusinessObjects metadata Repository with .xml data? If yes can you please share some document or link on how to do that?

    Can we populate BusinessObjects metadata Repository with .xml data? If yes can you please share some document or link on how to do that?

  • How to get a text between two XML tags?

    Hello everybody!
    I've got a problem! How can I extract a text that is between tags, like <myTag> My text </myTag> I have no problem to get the attributes inside the tags, however, i don't know how to get some text that is between tags. Here is my xml:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <tangram_request service_id="3">
    <send keep_session="nada">
    <source></source>
    <destination>3196931566</destination>
    <channel_id>2</channel_id>
    <text>Teste ServerSocket!!!</text>
    </send>
    </tangram_request>
    Now, there's a fragment of my code, which gets some tags' attributes:
    DOMParser parser = new DOMParser();
    InputSource resp = new InputSource(new StringReader(XML));
    parser.parse(resp);
    Document doc = parser.getDocument();
    Node node =(doc.getElementsByTagName "tangram_request")).item(0);
    if (node instanceof Element)
    Element el = (Element) node;
    service_id = el.getAttribute("service_id");
    System.out.println("\n\nService_id="+service_id);
    }else{System.out.println("Erro");}
    node = (doc.getElementsByTagName("send")).item(0);
    if (node instanceof Element)
    Element el = (Element) node;
    keep_session = el.getAttribute("keep_session");
    System.out.println("keep_session="+keep_session);
    }else{System.out.println("Erro");}
    Now, I want to get the texte between <destination> ... </destination>
    How could I do that?
    Thanks a lot
    Calegari

    Thanks... It worked fine!!!
    Now how can I get lots of <desctination>... I did something that haven't worked...
    node = (doc.getElementsByTagName("destination")).item(0);
    while(node.hasChildNodes())
    destination = node.removeChild(node.getFirstChild()).getNodeValue();
    System.out.println("destination="+destination);
    And now, my XML is like:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <tangram_request service_id="3">
    <send keep_session="nada">
    <source></source>
    <destination>3196931566</destination>
    <destination>3196931567</destination>
    <channel_id>2</channel_id>
    <text>Teste ServerSocket!!!</text>
    </send>
    </tangram_request>
    Thanks so much!
    Calegari

  • How to get IDoc Metadata and Structure without connection to sender

    Hello folks!
    Is there any chance to receive and process an IDoc with PI without having loaded the IDoc
    Metadata with a direct connection from the sending SAP System? Can't this be done by hand?
    Or is it not possible to bypass the IDoc Adapter and send the Idoc via an RFC?
    Thanks in advance
    Gunnar

    Hi!
    The idea behind the question is the following:
    Usually any NONE-SAP RFC-Server of an Integration Tool can receive IDocs just by
    beein registered at the sending system. The way you get the metadata into the
    receiving Integration tool is an complete different story an can be done by
    manually or by doneload the metadata from the DDIC just one time by hand.
    But with PI you need to connect to the sending SAP System directly
    with idx1 and by importing the structure out of the Integration Builder, right?

  • How to remove xmp metadata?

    I need to remove the "XMP metadata" information in the tiff(photoshop) files via scripting. Is it possible? Kindly advice me. Please provide examples.
    Thanks for looking into this..
    Regards,
    Maria Prabudass

    This will remove as much metadata that is possible by using scripting, anything else you need ExifTool.
    #target photoshop
    var f = File(Folder.desktop + "/example.tif");
    removeMetadata(f);
    function removeMetadata( file){
    if ( !ExternalObject.AdobeXMPScript ) ExternalObject.AdobeXMPScript = new ExternalObject('lib:AdobeXMPScript');
            var xmpf = new XMPFile( File(file).fsName, XMPConst.UNKNOWN, XMPConst.OPEN_FOR_UPDATE );
            var xmp = xmpf.getXMP();
            XMPUtils.removeProperties(xmp, "", "", XMPConst.REMOVE_ALL_PROPERTIES);
          if (xmpf.canPutXMP( xmp )) {
             xmpf.putXMP( xmp );
          xmpf.closeFile( XMPConst.CLOSE_UPDATE_SAFELY );
    The only other way is to save for web, open the file again and save as a tif.

  • How to get Length in pixel of a String in j2ee??

    Hi guys, im having a problem trying to find out how to get pixels from a string length, but in j2ee, i've researched, but everyone said to use Graphics2D, but since im using j2ee, i dont know how to use this.
    For example i found this piece of code, but this doesnt work for me:
    public void paint(Graphics g) {
    Graphics2D g2d = (Graphics2D)g;
    Font font = new Font("Serif", Font.PLAIN, 12);
    FontMetrics fontMetrics = g2d.getFontMetrics();
    int width = fontMetrics.stringWidth("aString");
    int height = fontMetrics.getHeight();
    How to get g2d, if i dont have a graphics to send it to the method??
    I would be really happy if anyone could send me a example using a javabean.
    How to do this guys???? please help me with this guys,thanks.
    yellr

    im working on a good explanation for this question, im trying to send pics of my programso you understand me pretty well. But a general idea, its im creating dynamically components, like labels, textFields, dropDowns, etc. My problem comes when im adding to form the labels, these labels are going to show the descripcion of the component, which it could be a textField, dropDown, textArea etc.
    I put all these components on a gridPanel, for each row i can have severals componets,
    I have a gridPanelGeneral which have all other gridPanels, this gridPanelGeneral have gridPanelRow+"numRow"
    This gridPanelRow+"numRow" can have severals components which show like columns.
    Sincerely i would like to put pictures of the program, so that way you will understand my problem, i need to set the label.setStyle(width:"+numPixelesOfDescriptionOfComponent+"px). To put these labels well, because the user cant see very well the description of the component when i have severals components, each component does have a label for its description. descriptionOfComponent is a string thats why i need to get the pixels of the string.
    One question, how do i do put pics on this forum??
    Edited by: yellr on Oct 30, 2007 9:56 AM

  • How to get these substrings based on the string entered

    Hi friends
    i want the substring entered in the string
    the string is something like this: 1234,3653,7684,3254,8777,987,234
    now i want
    the substrings between commas
    can some one help me with it pls
    in the first substring i need 1234
    in the second i need 3653...
    so on till the end..
    what ever the string be until the last one
    pls help

    Hi,
    You can do something like this:
    SELECT     txt
    ,     REGEXP_SUBSTR (txt, '[^,]+', 1, 1)     AS part_1
    ,     REGEXP_SUBSTR (txt, '[^,]+', 1, 2)     AS part_2
    ,     REGEXP_SUBSTR (txt, '[^,]+', 1, 3)     AS part_3
    FROM     table_x
    ;If there are fewer than n parts, then the technique above will not raise an error; it will just return NULL for part_n.
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only), and the results you want from that data.
    Explain how you get those results from that data.
    What do you want if the input is like this"
    {code}
    'foo,,bar'
    {code}
    ? Do you want to consider this as 2 parts ('bar' is the 2nd) or a s 3 (the 2nd is NULL, and 'bar' is the 3rd)? Include examples in your sample data and results.
    Always say what version of Oracle you're using.

Maybe you are looking for

  • 3 and 4 finger swipes no longer working along with pinch and rotate gesture

    Hi, thanks in advance for your help. I have the new aluminum unibody macbook pro. It has had absolutely no problems until now the 3 and 4 finger swipe gestures no longer work on the trackpad, as well as pinching to resize photos in Preview or the two

  • Budget not working

    Hi All, I have set block for the budget deviation. I have set budget for PO , GRPO, and Accounting. selected the radio button of monthly budget. I have set the 12000 as budget amount for G L NO EX1111. So per month budget amount is Rs.1000. For the f

  • "This is not a Test User account. Please create a new account in the Sandbox environment." How can i solve this problem?

    "This is not a Test User account. Please create a new account in the Sandbox environment." How can i solve this problem?

  • PC-Wechsel mit Photoshop Album

    Hallo zusammen, Ich will auch auf meinem Notebook PSA benutzen und habe dort einen anderen Pfad für die Bilder. Zwar liegen auf beiden PC´s die Bilder in den Eigenen Dateien / Eigene Bilder Ordner, nur ist der Benutzername anders, somit auf der absol

  • 3GS not ringing

    3GS...phone will not ring but goes direct to Voice mail...ringer and alerts all checked and work, volumes all up...I put my Sim into any other phone and it rings. Any thoughts?