Merge PPT Files using C++
PPT document merger using server-side C++ APIs.
Merge PPT File Using C++
In order to merge PPT file, we’ll use
API which is a feature-rich, powerful and easy to use document merger API for C++ platform. You can download its latest version directly, just open
package manager, search for Aspose.Slides.Cpp and install. You may also use the following command from the Package Manager Console.
Command
PM> Install-Package Aspose.Slides.Cpp
Steps for Merging PPT Files in C++
A basic document merging and concatenating with Aspose.Slides for C++ APIs can be done with just few lines of code.
Load both PPT files.
Use get_Slides() method to iterate through each slide.
Use AddClone function to merge with the desired file.
Use Save() method to save at specified path
System Requirements
Aspose.Slides for C++ supports on all major platforms and Operating Systems. Please make sure that you have the following prerequisites.
- Microsoft Windows or a compatible OS with C++ Runtime Environment for Windows 32 bit, Windows 64 bit and Linux 64 bit.
- Aspose.Slides for C++ DLL referenced in your project.
Merge PPT Files - C++
// The path to the documents directory.
const String sourceFilePath1 = u"SourceFile2.ppt";
const String sourceFilePath2 = u"SourceFile3.ppt";
const String outputFilePath = u"mergedOutput.ppt";
// Instantiate Presentation class
SharedPtr<Presentation> presentation1 = MakeObject<Presentation>(sourceFilePath1);
SharedPtr<Presentation> presentation2 = MakeObject<Presentation>(sourceFilePath2);
for (SharedPtr<ISlide> slide : presentation2->get_Slides()){
// Merge from source to destination
presentation1->get_Slides()->AddClone(slide);
}
// Save the presentation
presentation1->Save(outputFilePath, SaveFormat::Ppt);
Merge PDF Files Online
About Aspose.Slides for C++ API
Aspose.Slides API can be used to read, write, manipulate and convert Microsoft PowerPoint documents to PDF, XPS, HTML, TIFF, ODP and various other formats. One can create new files from scratch and save those in the relevant supported formats. Aspose.Slides is a standalone API for creating, parsing or manipulating presentations, slides and elements and it does not depend on any software like Microsoft or OpenOffice.Online PPT Merger Live Demos
Other Supported Merging Formats
Using C++, One can also merge many other file formats including..