Split PowerPoint PPT or PPTX into Multiple Files in Node.js

Split PowerPoint PPT or PPTX into Multiple Files in Node.js

PowerPoint is a presentation file created by Microsoft PowerPoint to create slideshow presentations. PPT or PPTX slides store collections of records and structures like slides, shapes, pictures, audio, video, text, etc. In various scenarios, you may need to split lengthy PowerPoint presentations into multiple files by slide range or break all PowerPoint slides into multiple PPT/PPTX files. It will be a time-consuming task if you manually split large PowerPoint files into separate files. So, this article covers how to split PowerPoint PPT or PPTX into Separate Files using Node.js.

This article talks about the following questions:

PowerPoint Splitter REST API and Node.js SDK

In order to split PPT or PPTX files, we will be using the Node.js SDK of GroupDocs.Merger Cloud API. It allows you to split, merge, remove and rearrange a single page or a collection of pages from supported document formats of Word, Excel, PowerPoint, Visio drawings, PDF, HTML, etc.

You can install GroupDocs.Merger Cloud into your Node.js application using the following command in the console:

npm 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:

Split PowerPoint Slides into Separate Files using Node.js

You can split PPTX file online programmatically on the cloud by following the simple steps mentioned below:

  • Upload the PowerPoint file to the Cloud
  • Split PowerPoint file using REST API in Node.js
  • Download the separated files

Upload the PowerPoint File

Firstly, upload the PowerPoint file to the Cloud using the code example given below:

As a result, the uploaded PowerPoint file will be available in the files section of your dashboard on the cloud.

Split PowerPoint PPTX File Online in Node.js

You can PowerPoint PPTX slides into separate files consisting of one page programmatically by following the steps given below:

  • Firstly, create an instance of the DocumentApi.
  • Secondly, Create an instance of the FileInfo.
  • Then, set the path to the input PPTX file.
  • Create an instance of SplitOptions.
  • Then, assign FileInfo to the Split Options.
  • Set specific page numbers in a comma-separated array to split PPTX.
  • Also, set slides, and split mode to Pages. It allows API to split page numbers given in a comma-separated array as a separate PPTX file.
  • Create SplitRequest with Split Options parameter
  • Finally, call the DocumentAPI.split() method with SplitRequest and get results.

The following code snippet shows how to split PowerPoint PPTX file in Node.js using REST API:

Download the Split Files

The above code sample will save the separated files on the cloud. You can download them using the following code sample:

Split PowerPoint PPTX into Multipage Files using Node.js

You can split PowerPoint presentation into multiple files programmatically by following the steps given below:

  • Firstly, create an instance of the DocumentApi.
  • Secondly, create an instance of the FileInfo class
  • Then, set the path to the input PowerPoint file.
  • Create an instance of SplitOptions.
  • Then, assign FileInfo to the Split Options.
  • Set page numbers interval from where to split in a comma-separated array.
  • Also, set slides split mode to Intervals. It allows the API to split PowerPoint slides based on the page intervals given in a comma-separated array.
  • Next, create SplitRequest with SplitOptions.
  • Finally, call the DocumentAPI.split() method with SplitRequest and get results.

The following code snippet shows how to split specific PowerPoint slides into separate files in Node.js using REST API:

Split PPT Slides Online by Page Range using Node.js API

In this section, you can extract slides from PowerPoint files by providing a range of page numbers programmatically using the steps given below:

  • Firstly, create an instance of the DocumentApi.
  • Secondly, create an instance of the FileInfo.
  • Then, set the path to the input PowerPoint file.
  • Create an instance of SplitOptions.
  • Then, assign FileInfo to the Split Options.
  • Set the start page number and the end page number.
  • Also, set PowerPoint split mode to Pages.
  • Create SplitRequest with Split Options.
  • Finally, call the DocumentAPI.split() method with SplitRequest and get results.

The following code snippet shows how to break ppt online into separate files using slides number range in Node.js:

Split PPT Slides Online Free

How do I split PPT file online for free? Please try the following free online PowerPoint splitter tool, which is developed using the above API.

Conclusion

To conclude, this blog post has demonstrated:

  • how to split PowerPoint PPTX or PPT presentations in Nodejs;
  • programmatically upload and download the separated slides from the cloud;
  • Nodejs split specific PowerPoint PPT or PPTX slides into multiple files;
  • how to split ppt slides online into separate files in Nodejs;

Moreover, Nodejs API allows you to reorder or replace PowerPoint pages, change page orientation, manage document passwords and perform other manipulations easily for various supported file formats. Besides, you can learn more about GroupDocs.Merge Cloud API following the documentation. We also provide an API reference section where you can view and interact with our APIs directly through the browser.

You can find more details on the Getting Started page.

Furthermore, Groupdocs.cloud is continually updated with fresh subjects. As a result, keep up with the latest API information.

Ask a question

You can ask your queries about PowerPoint PPT Splitter online via our Free Support Forum

FAQs

How do I split a PowerPoint into multiple files in Node.js?

Please follow this link to learn the code snippet for how to split PowerPoint slides into separate files using node.js conveniently.

How do I split a PowerPoint presentation online in Node.js using REST API?

Create an instance of ConvertApi, set the values of the convert settings, and invoke the convertDocument method with ConvertDocumentRequest to split PPTX and save each slide PowerPoint separately.

How do you split slides in PowerPoint online for free?

Online PPT splitter free allows you to split PPT online into multiple files, quickly and easily. Once the split process is completed, you can download the split PowerPoint slides.

How do I split a PowerPoint presentation into two separate ones in windows?

Please visit this link to download the PPT splitter in windows. This PPT split tool is used to divide PPT presentations quickly in windows, with one click.

See Also