Privacy issues via metadata export

Hi to everyone at the support team,

the Aspose.Words.dll exports word metadata (subject/title/author/keywords) to pdf documents.

Very nice feature - in the past we did this by our own code.

But now, some of our cutsomers have concerns about this feature.

How can we

- set metadata export on / off. If found no option to do this.

- block metadata export of some fields - the author field is most critical.

Aspose.Word.dll 14.6.0.0
.net 4.0 runtime
internal bugid#5620

Best regards, Martin Pfeifer

Hi Caroline,

Thanks for your inquiry.

m.pfeifer:

- set metadata export on / off. If found no option to do this.

Please use PdfSaveOptions.CustomPropertiesExport to get or set a value determining the way CustomDocumentProperties are exported to PDF file. Default value is None. PdfCustomPropertiesExport Enumeration specifies the way CustomDocumentProperties are exported to PDF file.

Standard : Custom properties are exported as entries in /Info dictionary.
Custom properties with the following names are not exported: “Title”, “Author”, “Subject”, “Keywords”, “Creator”, “Producer”, “CreationDate”, “ModDate”, “Trapped”.

Metadata : Custom properties are Metadata.
The namespace of exported properties in XMP packet is “custprops”. Every property has an associated xml-element “custprops:Property1”, “custprops:Property2” and so on. There is “rdf:Description” element inside property element. The description element has two elements “custprops:Name”, containing custom property’s name as a value of this xml-element, and “custprops:Value”, containing custom property’s value as value of this xml-element.

None: No custom properties are exported.
m.pfeifer:

- block metadata export of some fields - the author field is most critical.

In this case, I suggest you please remove the specific custom document properties which you do not want to export and save the document to Pdf. Please remove the CustomDocumentProperties.Remove method to remove a property with the specified name from the collection.
E.g
Document.CustomDocumentProperties.Remove(“Property Name”);