Merge FODP 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 FODP 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 FODP 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 FODP 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 FODP 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.fodp");
$pres2 = new Presentation("document2.fodp");
try
{
    for ($i = 0; $i < java_values($pres2->getSlides()->size()); $i++) 
    {
        $pres1->getSlides()->addClone($pres2->getSlides()->get_Item($i));
    }

    $pres1->save("merged.fodp", SaveFormat::Fodp);
}
finally
{
    if ($pres1 != null) $pres1->dispose();
    if ($pres2 != null) $pres2->dispose();
}
?>

How to merge FODP using Aspose.Slides for PHP API

These are the steps to merge two FODP files and save result as FODP in PHP.

  1. Install Aspose.Slides for PHP via Java. See Installation .

  2. Add the library as a reference in your project.

  3. Load the FODP files you want to merge.

  4. Save the resulting FODP doc.

Merge PDF Files Online

How to Merge PDF in Python

Export FODP To Other Supported Formats

You can also combine FODP and save to other file formats. See all supported formats below