sanitize method

On this page

sanitize

Removes writable metadata properties from the package recursively, affecting all nested packages as well.

def sanitize(self):
    ...

Returns: int: The number of affected properties.

Example

    from groupdocs.metadata import Metadata

    with Metadata("input.docx") as metadata:
        removed = metadata.sanitize()
        print(f"Removed {removed} properties")
        metadata.save("output.docx")
    ```

### See Also
* class [`WordProcessingInspectionPackage`](/metadata/python-net/groupdocs.metadata.formats.document/wordprocessinginspectionpackage/)

On this page