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