Merge OTP files together in PHP
High-speed and cross-platform PHP API that helps in developing applications with the ability to create, merge, inspect, or convert Microsoft PowerPoint and OpenOffice presentation files without the use of any software like Microsoft or Open Office, Adobe PDF.
Merge OTP in PHP
Aspose.Slides for PHP via Java is a powerful PHP library for creating and manipulating presentation files. Moreover, it provides flexible ways to combine multiple OTP presentations. When you merge one presentation to another, you are effectively combining their slides in a single presentation to obtain one file. Aspose.Slides allows you merge two presentations in different ways. You get to merge presentations with all their shapes, styles, texts, formatting, comments, animations, etc. without having to worry about loss of quality or data.
Merge OTP files using PHP
To merge the PowerPoint presentations, you will need to clone the slides from one presentation to the other.
PHP code for merge multiple OTP into single file
<?php
require_once("http://localhost:8080/JavaBridge/java/Java.inc");
require_once("lib/aspose.slides.php");
use aspose\slides\Presentation;
use aspose\slides\SaveFormat;
$pres1 = new Presentation("document1.otp");
$pres2 = new Presentation("document2.otp");
try
{
for ($i = 0; $i < java_values($pres2->getSlides()->size()); $i++)
{
$pres1->getSlides()->addClone($pres2->getSlides()->get_Item($i));
}
$pres1->save("merged.otp", SaveFormat::Otp);
}
finally
{
if ($pres1 != null) $pres1->dispose();
if ($pres2 != null) $pres2->dispose();
}
?>
How to merge OTP using Aspose.Slides for PHP API
These are the steps to merge two OTP files and save result as OTP in PHP.
Install Aspose.Slides for PHP via Java. See Installation .
Add the library as a reference in your project.
Load the OTP files you want to merge.
Save the resulting OTP doc.