How to Convert PowerPoint to PPT with Node.js
While PowerPoint offers a long list of useful features, backwards compatibility isn’t one of them; for those using older versions of PowerPoint, PPTX files are unfortunately unusable. Thankfully, there’s an easy solution: the below code will perform a high quality PPTX to legacy PPT conversion, and you can build this service into your applications for free. All you need to do is copy & paste from the Node.js code examples provided below and supply a free-tier Cloudmersive API key to complete your API call (you can get an API key by registering a free account on our website).
To get started, we need to install the SDK, which we can do by running the below command:
npm install cloudmersive-convert-api-client --save
After that, we just need to call the function (including our presentation & API key in their respective fields), and we’re already finished:
var CloudmersiveConvertApiClient = require('cloudmersive-convert-api-client');
var defaultClient = CloudmersiveConvertApiClient.ApiClient.instance;
// Configure API key authorization: Apikey
var Apikey = defaultClient.authentications['Apikey'];
Apikey.apiKey = 'YOUR API KEY';
var apiInstance = new CloudmersiveConvertApiClient.ConvertDocumentApi();
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.convertDocumentPptxToPpt(callback);