Please check the following sample PHP code to convert PPTX to PDF. Hopefully, it will help you to accomplish the task. You may also check the detail of convert method from the PHP unit tests.
<?php
require_once('D:\xampp\htdocs\aspose-slides-cloud-php-master\vendor\autoload.php');
//TODO: Get your AppSID and AppKey at https://dashboard.aspose.cloud (free registration is required).
$configuration = new Aspose\Slides\Cloud\Sdk\Api\Configuration();
$configuration->setAppSid("xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx");
$configuration->setAppKey("xxxxxxxxxxxxxxxxxxxxxxxx");
$slidesApi = new Aspose\Slides\Cloud\Sdk\Api\SlidesApi(null,$configuration);
try {
// Upload source document to Storage
$testdocument = fopen("C:/Temp/Test.pptx", 'r');
$testformat = "pdf";
$testpassword = null;
$testfontsfolder = null;
$response = $slidesApi->convert($testdocument, $testformat, $testpassword, $testfontsfolder);
echo "Completed!!!!";
} catch (Exception $e) {
echo "Something went wrong: ", $e->getMessage(), "\n";
PHP_EOL;
}
?>
Thank you for your help, but I have the same error.
Argument 2 passed to Aspose\Slides\Cloud\Sdk\Api\SlidesApi::convert() must be an instance of Aspose\Slides\Cloud\Sdk\Api\string, string given … at …/aspose/slides-sdk-php/sdk/Api/SlidesApi.php line 25335
We are sorry for the inconvenience. The following code is working fine at my end. Please share your sample working code. It will help us to replicate the issue and investigate it.