How to Convert a PDF to a PowerPoint PPTX Presentation
As popular as PowerPoint is as a presentation format, the size of an output PPTX file leaves much to be desired. As such, it’s common to convert PPTX presentations to PDF format to save a little space when sending that file over email.
To help make the transition back into PPTX format at scale, you can easily utilize our PDF to PPTX conversion API. This will make it super simple and easy to edit & process the resulting PPTX file, so you won’t have to skip a beat or get bogged down in monotonous manual conversions. You can use this API for free by simply copying & pasting the JavaScript code examples below to structure your API call. In addition to that, all you’ll need is a Cloudmersive API key to authenticate access, which you can get by registering a free account on our website.
To make your API call using the XHR feature in JavaScript, use the below code:
var data = new FormData();
data.append("inputFile", fileInput.files[0], "file");
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;xhr.addEventListener("readystatechange", function() {
if(this.readyState === 4) {
console.log(this.responseText);
}
});xhr.open("POST", "https://api.cloudmersive.com/convert/pdf/to/pptx");xhr.setRequestHeader("Apikey", "YOUR-API-KEY-HERE");xhr.send(data);
To instead use jQuery, first install the library by running the below command:
bower install jquery
And then use the following code to structure your API call:
var form = new FormData();
form.append("inputFile", fileInput.files[0], "file");var settings = {
"url": "https://api.cloudmersive.com/convert/pdf/to/pptx",
"method": "POST",
"timeout": 0,
"headers": {
"Content-Type": "multipart/form-data",
"Apikey": "YOUR-API-KEY-HERE"
},
"processData": false,
"mimeType": "multipart/form-data",
"contentType": false,
"data": form
};$.ajax(settings).done(function (response) {
console.log(response);
});
Easy as can be — you can put your PPTX conversion needs to rest.