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