Merge PPSM Files in PHP
Combine PPSM presentations with Aspose.Slides for PHP via Java.
Merge PPSM in PHP
Aspose.Slides for PHP via Java can combine multiple PPSM presentations into one file. The API clones slides from each source presentation into a destination presentation while retaining their content and formatting.
Merge PPSM files using PHP
To merge PPSM presentations, load both files, clone each source slide into the destination presentation with addClone, and save the result in PPSM format.
PHP code for merging multiple PPSM files
$destinationPresentation = new Presentation("document1.ppsm");
$sourcePresentation = new Presentation("document2.ppsm");
try {
$slideCount = java_values($sourcePresentation->getSlides()->size());
for ($slideIndex = 0; $slideIndex < $slideCount; $slideIndex++) {
$slide = $sourcePresentation->getSlides()->get_Item($slideIndex);
$destinationPresentation->getSlides()->addClone($slide);
}
$destinationPresentation->save("merged.ppsm", SaveFormat::Ppsm);
} finally {
$sourcePresentation->dispose();
$destinationPresentation->dispose();
}
How to merge PPSM files in PHP
Follow these steps to merge two PPSM files and save the result as PPSM in PHP.
Install Aspose.Slides for PHP via Java. See Installation .
Configure Aspose.Slides in your PHP project.
Load the source and destination PPSM files with the
Presentationclass, then clone each source slide withaddClone.Call
savewith the output file path andSaveFormat::Ppsm.