$storageApi = new StorageApi();
$slidesApi = new SlidesApi();
$apiClient = new APIClient();
$storage = “spotify_cmo_mmd”;
$master = “Sample_spot_01.pptx”;
$clone = “clone2.pptx”;
$test = array(2,3);
try {
//upload file to aspose cloud storage
//$result = $storageApi->PutCreate($fileName, “”, $storage, getcwd() . ‘/assets/’ . “Clone.pptx”);
//invoke Aspose.Slides Cloud SDK API
$response = $storageApi-> GetIsExist($master, “”, “”);
//echo “
Cloned
”;
if ($response != null && $response->Status = “OK”) {
echo “Master File Ready
”;
$response = $storageApi->PutCopy($master, $clone, “”, “”, “”, $master);
if ($response != null && $response->Status = “OK”) {
// $response = $storageApi-> GetIsExist($clone, “”, “”);
// if ($response != null && $response->Status = “OK”) {
echo “Master Cloned
”;
echo “Preparing to edit
”;
$response = $slidesApi->DeleteSlideByIndex($clone,2,"",“aspose”);
// print_r($response);
// }
foreach ($test as $x) {
// $response = $slidesApi->DeleteSlideByIndex($clone,$x,"","");
}
$result = $storageApi->GetDownload($clone);
$apiClient->saveFile($result, getcwd() . “/output/” . $clone);
echo “clone saved on server”;
}
}
} catch (\Aspose\Words\ApiException $exp) {
echo “Exception:” . $exp->getMessage();
}