A PPT file contains several different types of information such as text, bulleted points, images, multimedia, and other embedded OLE objects. From the year 2007 onwards, Microsoft came up with a newer file format for PowerPoint, known as PPTX that is based on Office OpenXML and is different from this binary file format. Usually, a PowerPoint Presentation is comprised of multiple slides that may and may not have similar formatting.
While using Aspose.Slides Cloud API, you get a wide range of options to perform PowerPoint slides split operations i.e. use Swagger interface to accomplish your requirements, use cURL commands or use application programming language-specific SDK such as C#, Java, PHP, Ruby, Python, etc
Swagger interface to Split slides
The API Reference for Aspose.Slides Cloud is published online in swagger format. As per the Document Object Model of Aspose.Slides, a PowerPoint presentation is represented with the Document object which contains a collection of Slides. The PowerPoint processing Cloud API provides a myriad of options when splitting the PowerPoint slides and enables you to save the output in a variety of output formats. The image on the right side shows the list of supported output formats by the split operation.
Now as a first step, authenticate your user by providing App SID and App Key and once you have provided the valid credentials, a JWT token is generated. So in order to accomplish our requirement to split the PowerPoint presentation slides, we need to use PostSlidesSplit method. Now click the Try it out button next to the Split POST method. At a bare minimum, you need to provide the name of an input Presentation file to start the operation.
In this scenario, we are going to use Presentation1.pptx as shown in the image above to perform the split operation. Under format dropdown, we need to select the desired output format after the split operation. Let’s use PPTX for this scenario. The next step is to specify the From and To slide value. If From value is not specified, splitting starts from the first slide of the presentation and if we do not provide To value, splitting ends at the last slide of the document. Since our input Presentation file has only two slides, so we are going to skip this step and it will split both slides as separate presentation files. Now click the Execute button and the operation will be started.
If the user account is properly authenticated and desired input parameters are correct, you will notice a server response code 200 is displayed and the response body will list source and resultant PPTX files links. Please take a look over the following image file.
You may also observe a cURL command is displayed which can also be used to perform further PowerPoint slides split operation (after updating the required arguments).
Now let’s have a look at cloud storage after this operation. Notice that two new PowerPoint presentation files are listed on cloud storage.
Now let’s have a look over the individual presentation files.
Split PowerPoint slides using C# .NET
The same requirements as specified above can be accomplished using C#.NET code snippet using Aspose.Slides Cloud SDK for .NET. In the following code snippet, first, the Presentation1.pptx file is uploaded to cloud storage, and then Slides split operation is performed.
In the above code snippet, we can generate the output in various other supported formats including PDF, JPEG, PNG, JPEG, HTML, XPS, SVG, etc. Simply change the value of SlideExportFormat enumeration in PostSlidesSplitRequest() method.