Setting PDF properties

Hi there,

I'm trying to remove the properties from a PDF, been through the
example code and it all seems to be fine...except after saving and
opening the file the properties are still there, code I'm using is:

PDFNet.Initialize();
PDFDoc d = new PDFDoc(fileName);
d.InitSecurityHandler();

PDFDocInfo docInfo = d.GetDocInfo();
docInfo.SetAuthor("");
docInfo.SetCreationDate(new Date());
docInfo.SetCreator("");
docInfo.SetKeywords("");
docInfo.SetModDate(new Date());
docInfo.SetProducer("");
docInfo.SetSubject("");
docInfo.SetTitle("");

d.Save(GetCleanedName(fileName, "PropertiesRemoved"),
pdftron.SDF.SDFDoc.SaveOptions.e_linearized);
d.Close();

The above works fine if I create a new pdf programatically, however
with a precreated file the changes are not saved.

Sample problematic pdf here:
http://www.filefactory.com/file/c46748a/n/RemoveProperties.pdf

The most likely problem is that this file also contains an XMP
metadata steam. You could remove the XMP stream as follows:
   doc.GetRoot().Erase("Metadata");

That works, many thanks!