How to Merge PowerPoint Online using C# .NET

Learn how to merge PowerPoint online using .NET SDK. Merge PPT and save the output as a single Microsoft PowerPoint file

Merge PowerPoint
Merge Presentation PowerPoint | Learn how to merge PowerPoint online

This article explains the details on how to merge PowerPoint presentations using cloud-based .NET SDK. Owing to the popularity of PowerPoint presentations, it is deemed as a de facto standard for data representations and briefing in corporate cultures. Similarly, PowerPoint is generally used by business people and students to design slide show presentations. At the same time, they are used to make tutorials for training purposes or educational contexts. Another aspect of their popularity is their usage in creating tutorials, digital portfolios, basic animations, or photo slide shows creation.

There can be a scenario where multiple people working in different departments or in different distant locations work on certain modules of the presentation and in the end, you have a requirement to merge PowerPoint presentations. It can easily be done when we have to work on a few files but if the requirement is to merge PowerPoint presentations in a continuous routine, then a programming solution is the most viable solution. We understand that when using the conventional approach, we need to install and maintain the copy of APIs which can perform the concatenation operations but the usage of cloud-based APIs can save us from such cumbersome activities.

PowerPoint Processing API

Aspose.Slides Cloud is our REST-based solution providing the capabilities to create, manipulate and transform PowerPoint Presentations (PPT, PPTX, PPS, POTX, PPSX, ODP, etc) to various Supported File Formats. At the same time, it also provides the capabilities to combine PowerPoints and save the output as a single consolidated file. To further facilitate our customers, we have created the programming language-specific SDKs, so that you can utilize the document processing capabilities within your favorite programming language. Now as per the scope of this article, we are going to discuss the details of how to merge Microsoft PowerPoint Presentations using Aspose.Slides Cloud SDK for .NET. It’s a wrapper around cloud API and can be used in Desktop, Web, Mobile, or Hybrid applications to combine PowerPoints.

Please note the pre-requisite for using .NET SDK is its installation and is available for download over NuGet | GitHub. Now execute the following command in the package manager console to install Aspose.Slides Cloud SDK for .NET using

Install-Package Aspose.Slides-Cloud

Similarly, in order to install the SDK through the command line terminal, please execute the following command.

nuget install Aspose.Slides-Cloud

Once the SDK is installed, the next step is to create an Aspose Cloud account and obtain client credential details. These credentials are necessary to connect to Cloud services as well as to access documents from cloud storage. If you have GitHub or Google account, simply Sign Up. Otherwise, click on the Create a new Account button and provide the required information. Now login to the dashboard using credentials and expand the Applications section from the dashboard and scroll down towards the Client Credentials section to see Client ID and Client Secret details.

Client Credentials
Image 1:- Client Credentials on Cloud Dashboard.

Merge PowerPoint Presentation using C#

Now let’s follow the steps given below to initiate the concatenation of Microsoft PowerPoint online using the C# .NET code snippet.

  • First, we need to create an object of the Configuration class
  • Secondly, set client credentials to a configuration instance
  • Thirdly, create an object of SlidesApi while passing the configuration object as an argument
  • The next step is to create an object of PresentationsMergeRequest class and pass an array of Microsoft Presentation files to be merged
  • Finally, call the Merge(…) method of SlidesApi class to combine PowerPoints and save the output to original input PowerPoint

How to Combine PowerPoint online using cURL Commands

The REST APIs can be accessed via cURL commands on any platform. So in this section, we are going to explore the details of how we can combine PowerPoint online using the cURL commands. So the first step is to create a JWT access token based on your client credentials. Please execute the following command to generate the JWT token.

curl -v "https://api.aspose.cloud/connect/token" \
-X POST \
-d "grant_type=client_credentials&client_id=bbf94a2c-6d7e-4020-b4d2-b9809741374e&client_secret=1c9379bb7d701c26cc87e741a29987bb" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Accept: application/json"

Once we have the access token, then we can execute the following command to load PowerPoint presentations from cloud storage and merge them using the cURL command.

curl -X POST "https://api.aspose.cloud/v3.0/slides/test-unprotected-old.pptx/merge" \
-H  "accept: application/json" \
-H  "authorization: Bearer <JWT Token>" \
-H  "Content-Type: application/json" \
-d "{  \"PresentationPaths\": [    \"test-unprotected.pptx\",\"Resultant.pptx\"  ]}"

Conclusion

In this article, we have explored the details of how to combine Microsoft PowerPoint online. The conversion details have been shared for Aspose.Slides Cloud SDK for .NET. Furthermore, we have also learned about the steps to combine PowerPoint using the cURL commands. Please note that all our Cloud SDKs are developed under an MIT license, so you may download them from Github and make the necessary changes. In case you encounter any issues while using the API, please feel free to contact us via the free customer support forum.

Related Articles

We recommend visiting the following links to learn more about