0 Replies Latest reply on Mar 3, 2014 9:57 AM by dkellymm

    Unable to clear Keywords metadata value


      Hello, I'm trying to clear the keywords metadata field using the following code but it doesn't work as expected. No errors just doesn't clear the Keywords field.


      var xml = new XML(doc.metadata);

      var nsrdf = new Namespace("http://www.w3.org/1999/02/22-rdf-syntax-ns#");

      var nspdf = new Namespace("http://ns.adobe.com/pdf/1.3/");

      delete xml.nsrdf::RDF.nsrdf::Description.@nspdf::Keywords;

      doc.info.Keywords = "";

      doc.metadata = xml.toXMLString();


      If I call just doc.info.Keywords = "" it appends a blank keywords to the front of the existing keywords.


      How do I clear Keywords?