private void AddMetadata(DocumentPackage package, ZipFile z) { StringBuilder sb = new StringBuilder(); using (StringWriter w = new StringWriter(sb)) { package.Generate().Save(w); } z.AddEntry(XDMStandard.DefaultMetadataFilePath, sb.ToString()); }