Save a modified file to the original source
Leave feedback
This example shows how to save the modified content back to the underlying source. Call save() with no arguments — the changes are written back to the file (or stream) the document was loaded from.
fromgroupdocs.metadataimportMetadatadefsave_file_to_original_source():withMetadata("input.ppt")asmetadata:# Edit or remove metadata hereremoved=metadata.sanitize()print(f"Removed {removed} properties")# Saves the document back to the underlying source (stream or file)metadata.save()if__name__=="__main__":save_file_to_original_source()