MetadataSanitize Method
Removes writable metadata properties from all detected packages or whole packages if possible. The operation is recursive so it affects all nested packages as well.

Namespace: GroupDocs.Metadata
Assembly: GroupDocs.Metadata (in GroupDocs.Metadata.dll) Version: 20.9
Syntax
public int Sanitize()

Return Value

Type: Int32
The number of affected properties.
Remarks
Learn more
Examples
This example demonstrates how to remove all detected metadata packages/properties from a file.
C#
using (Metadata metadata = new Metadata(Constants.InputPdf))
{
    // Remove detected metadata packages
    var affected = metadata.Sanitize();
    Console.WriteLine("Properties removed: {0}", affected);

    metadata.Save(Constants.OutputPdf);
}
See Also