How to Combine and Merge PowerPoint PPT PPTX Files Online using REST API in Ruby

Combine and Merge PowerPoint PPT and PPTX Files Online using REST API in Ruby

Merging PowerPoint presentations can be useful in various scenarios such as combining content from multiple PPT/PPTX, merging parts of a single presentation created by two or more people, and etc. The manual way of copying and pasting the content may not be suitable when dealing with a number of presentations. Therefore, this article lets the developers learn how to merge PowerPoint PPT/PPTX files online using REST API in Ruby.

The following topics shall be covered in this article:

Ruby REST API to Merge PowerPoint Presentations and SDK Installation

For merging two or more PowerPoint presentations , I will be using the GroupDocs.Merger Cloud API for Ruby. It allows you to combine two or more pptx files into a single pptx file and also supports to split up one source document into multiple documents. It also enables you to shift, delete, exchange, rotate or change the page orientation either as portrait or landscape for the whole or preferred range of pages. The SDK supports merging and splitting of all popular document formats such as Word, Excel, Visio, OneNote, PDF, HTML, etc.

You can install GroupDocs.Merger Cloud to your Ruby application using the following command in the console:

gem install groupdocs_merger_cloud

Please get your Client ID and Secret from the dashboard before following the mentioned steps. Once you have your ID and secret, add in the code as shown below:

Merge Multiple PowerPoint Files using REST API in Ruby

You can combine two or more PowerPoint PowerPoint presentations programmatically on the cloud by following the simple steps mentioned below. It is secure and fast way to merge multiple PPTX documents into a single file programmatically by following the steps mentioned below:

  • Create an instance of the DocumentApi
  • Create an instance of the JoinItem
  • Set the input file path for first JoinItem in the FileInfo
  • Create new instance of the JoinItem for the second PPTX document
  • Provide the input file path for second JoinItem in the FileInfo
  • Add more JoinItems to merge more PPTX files
  • Create an instance of the JoinOptions
  • Add a comma separated list of created join items
  • Set the output file path on the cloud
  • Create an instance of the JoinRequest with JoinOptions
  • Get results by calling the join() method of the DocumentAPI with JoinRequest

The following code snippet shows how to merge multiple PowerPoint files using a REST API in Ruby:

Merge Specific Pages of Multiple PowerPoint Files in Ruby

You can easily combine specific pages from multiple PowerPoint slides into a single file programmatically by following the steps mentioned below:

  • Create an instance of the DocumentApi
  • Create an instance of the JoinItem
  • Set the input file path for first JoinItem in the FileInfo
  • Define a list of page numbers to be merged
  • Create another instance of the JoinItem
  • Set the input file path for second JoinItem in the FileInfo
  • Define start page number and end page number
  • Define the page range mode as OddPages
  • Create an instance of the JoinOptions
  • Add a comma separated list of created join items
  • Set the output file path on the cloud
  • Create an instance of the JoinRequest with JoinOptions
  • Finally, merge slides by calling the join() method of the DocumentAPI with JoinRequest

The following code snippet shows how to merge specific pages from multiple PowerPoint files using a REST API in Ruby:

Online Combine PowerPoint Presentations

Please try the following free online PPTX Merger application. It allows you to combine multiple PowerPoint presentations into a single file from any device.

Summing up

In this blog post, you have learned:

  • how to combine multiple PowerPoint files on the cloud;
  • how to combine specific pages of multiple PowerPoint files into one file;
  • online merge PowerPoint presentations for free;

The PPTX merger REST API also provides .NET, Java, PHP, Python, Android, and Node.js SDKs as its document merger family members for the Cloud API. You can learn more about GroupDocs.Merge Cloud API using the documentation. We also provide an API Reference section that lets you visualize and interact with our APIs directly through the browser.

Ask a question

If you have any questions about how to combine multiple PPT/PPTX files, please feel free to ask in Free Support Forum and it will be answered within a few hours.

See Also