remove_properties method
Leave feedback
On this page
Removes metadata properties satisfying the specified predicate.
def remove_properties(self, predicate):
...
| Parameter | Type | Description |
|---|---|---|
| predicate | Func[MetadataProperty, bool] |
A function to test each metadata property for a condition. |
Returns: int: The number of affected properties.
from groupdocs.metadata import Metadata
def remove_author_properties(input_path, output_path):
with Metadata(input_path) as metadata:
affected = metadata.remove_properties(
lambda p: p.name is not None and "author" in p.name.lower()
)
print(f"Removed {affected} properties")
metadata.save(output_path)
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.