Convert presentation to PDF
The following example will demonstrate how to convert a Presentation (.pptx, .ppt) to a PDF.
You can view the full Swagger documentation here.
Request
- cURL
- Javascript
- PHP
curl --location 'https://presentation-api.doclabs.cloud/api/v1/MyDocument.xlsx/convert?storageName=MyBucketName&type=pdf' \
--header 'Content-Type: application/json' \
--header 'x-api-key: ••••••'
var settings = {
"url": "https://presentation-api.doclabs.cloud/api/v1/MyDocument.xlsx/convert?storageName=MyBucketName&type=pdf",
"method": "POST",
"timeout": 0,
"headers": {
"Content-Type": "application/json",
"x-api-key": "••••••"
},
};
$.ajax(settings).done(function (response) {
console.log(response);
});
<?php
$client = new Client();
$headers = [
'Content-Type' => 'application/json',
'x-api-key' => '••••••'
];
$request = new Request('POST', 'https://presentation-api.doclabs.cloud/api/v1/MyDocument.xlsx/convert?storageName=MyBucketName&type=pdf', $headers);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
Response
{
"bucketName": "MyBucketName",
"contentPathName": "CopyOfTheOriginal.pdf"
}