We're sorry AsposeCloud doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.cloud

Class "PostPresentationMergeRequest" Is Not Found

Dear Aspose team,

the class “PostPresentationMergeRequest” is not found when running the PHP code below.


require_once '../vendor/autoload.php';

   // For complete examples and data files, please go to https://github.com/aspose-Slides-cloud/aspose-Slides-cloud-php

   use Aspose\Slides\Cloud\Sdk\Api\SlidesApi;
   use Aspose\Slides\Cloud\Sdk\Api\Configuration;
   use Aspose\Slides\Cloud\Sdk\Model;
   use Aspose\Slides\Cloud\Sdk\Model\Requests;

// $tmp = __DIR__;

   try {
		// Create SlidesApi instance
		$config = new Configuration();
		$slidesApi = new SlidesApi(null, $config);

		$fileName = "Agenda-1.pptx";
		$fileName2 = "Agenda-74513.pptx";

		$inputFolder = realpath(__DIR__ ) . '\\';

		// Upload original documents to storage
		$fileStream = fopen($inputFolder . $fileName, 'r');
		$slidesApi->uploadFile($fileName,  $fileStream, "SlideStorage");

		$fileStream2 = fopen($inputFolder . $fileName2, 'r');
		$slidesApi->uploadFile($fileName2,  $fileStream2, "SlideStorage");

		$mergeList = new Model\PresentationsMergeRequest();
		$mergeList->setPresentationPaths(array($fileName, $fileName2));

		$request = new Requests\PostPresentationMergeRequest($fileName, $mergeList);
		$result = $slidesApi->postPresentationMerge($request);

   } catch (Exception $e) {
      echo "Something went wrong: ", $e->getMessage(), "\n";

Some parts of Slides Cloud Documentation and code examples are outdated. We apologize for any inconvenience. We are working on updating the documentation. The following code snippet shows you how to merge the second presentation to the first presentation:

use Aspose\Slides\Cloud\Sdk\Api\Configuration;
use Aspose\Slides\Cloud\Sdk\Api\SlidesApi;
use Aspose\Slides\Cloud\Sdk\Model\PresentationsMergeRequest;

$configuration = new Configuration();

$slidesApi = new SlidesApi(null, $configuration);

$storageName = "SlideStorage";
$fileName = "Agenda-1.pptx";
$fileName2 = "Agenda-74513.pptx";

// <Put your code for uploading the files here>

$mergeRequest = new PresentationsMergeRequest();

$resultInfo = $slidesApi->merge($fileName, $mergeRequest, null, null, $storageName);

echo $resultInfo;