PHP code example of aspose-cloud / aspose-words-cloud
1. Go to this page and download the library: Download aspose-cloud/aspose-words-cloud library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
aspose-cloud / aspose-words-cloud example snippets
// Start README example
$api = new WordsApi($clientId, $clientSecret);
// the step is optional, the default value is https://api.aspose.cloud
$api->getConfig()->setHost($baseUrl);
// upload file to cloud
$upload_request = new Requests\UploadFileRequest($localFilePath, 'fileStoredInCloud.doc');
$upload_result = $api->uploadFile($upload_request);
// save as pdf file
$saveOptions = new PdfSaveOptionsData(array("file_name" => 'destination.pdf'));
$request = new Requests\SaveAsRequest('fileStoredInCloud.doc', $saveOptions);
$result = $api->saveAs($request);
// End README example