Edit PPTM in PHP

High-speed and cross-platform PHP library for editing PPTM using PHP code

Edit PPTM using Aspose.Slides

Aspose.Slides for PHP via Java is a powerful PHP library for editing presentations quickly and easily. It provides users with an extensive range of features to help them create professional-looking slides in no time at all. With Aspose, users can edit text, add images, animations and transitions to their presentation as well as apply various formatting options such as font type and color selection. Additionally, the library offers support for both PowerPoint (PPT) files and OpenOffice Presentation (ODP) formats which makes it easier than ever to share presentations across different platforms without any compatibility issues arising. By leveraging the power of Aspose’s library when creating or editing your next presentation you’ll be sure that your slides look great every time! You can edit a PPTM file by adding a new line of text to it.

Edit PPTM in PHP

Using Aspose.Slides for PHP via Java , you can add a new line of text to the PPTM document with just a few lines of code.

PHP code for editing PPTM


<?php
require_once("http://localhost:8080/JavaBridge/java/Java.inc");
require_once("lib/aspose.slides.php");
 
use aspose\slides\Presentation;
use aspose\slides\SaveFormat;
 
$pres = new Presentation("input.pptm");
try
{
    $slide = $pres->getSlides()->get_Item(0);     
    $shape = $slide->getShapes()->addAutoShape(ShapeType::Rectangle, 10, 10, 100, 50);
    $shape->getTextFrame()->setText("New text");

    $pres->save("input.pptm", SaveFormat::Pptm);
}
finally
{
    if ($pres != null) $pres->dispose();
}
?>

How to edit PPTM in PHP

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

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

  3. Create an instance of the Presentation class.

  4. Load the PPTM presentation you want to edit.

  5. Add a new line of text.

  6. Save the changed file.

Edit other files

You can also edit files in other formats