1 Reply Latest reply on Jun 26, 2011 5:13 AM by Bernd Alheit

    Embedding or replacing XMP values in PDF via Acrobat Reader

    tensai2000

      Hi,
       
      I've been struggling with this.
       
      We're building a form solution via Adobe X Professional
      and then reader extending it to be able to submit the form
      via Web Services
       
      The specific behaviour being
      - XFDF is being used to prepopulate a form
      - Based on values in the XFDF - we're creating XMP metadata
      and then trying to update the XMP metadata within the PDF
       
      This works in Acrobat Professional, but is not working at all
      in Acrobat Reader (even after Reader extending)
       
      Looking through the Javascript guide, it appears the 'metadata' properly
      has restrictions placed on it when it is being used in Reader
       
      Are there any other options to do this within Reader only ?
      - Some other API call ?
      - Can somehow XFDF data pre-populated be used to drive population of the XMP metadata
       
      Would appreciate any advise around this. I've posted a sample below to demonstrate the sort of thing we want to do in Reader
       
      Regards,
      Himanshu
       
      ------------ Example of what worked in Acrobat Pro, but not in Reader ------
      var meta = this.metadata;
      var myXMPData = new XML(meta);
       
      myrdf = new Namespace("http://www.w3.org/1999/02/22-rdf-syntax-ns#");
      myData = new Namespace("http://ns.abc/xyz/1.0/");
       
      var p = myXMPData.myrdf::RDF.myrdf::Description;
      p.@myData::Phone = "38922221";
       
      myNewXMPStr=myXMPData.toXMLString();
      this.metadata = myNewXMPStr;
      -----------------------------------------------------------------------------

      My Product Information:
      Reader 8.2.6, Windows