public static function remove_property($dataDir = null) { # Instantiate the Presentation class that represents the presentation $pres = new Presentation($dataDir . "HelloWorld.pptx"); # Getting Document Properties $dp = $pres->getDocumentProperties(); # Getting property name at particular index $property_name = $dp->getPropertyName(2); # Removing selected property $dp->remove($property_name); # Saving presentation $save_format = new SaveFormat(); $pres->save($dataDir . "RemoveDP.pptx", $save_format->Pptx); print "Remove document property, please check output file."; }