Edit ODP in PHP
Load, modify, and save ODP presentations with Aspose.Slides for PHP via Java.
Edit ODP in PHP
Using Aspose.Slides for PHP via Java , you can add a text shape to an ODP presentation with a few lines of PHP code.
PHP code for editing ODP
$presentation = new Presentation("input.odp");
try {
$slide = $presentation->getSlides()->get_Item(0);
$shape = $slide->getShapes()->addAutoShape(
ShapeType::Rectangle, 10, 10, 100, 50);
$shape->getTextFrame()->setText("New text");
$presentation->save("output.odp", SaveFormat::Odp);
} finally {
$presentation->dispose();
}Edit ODP using Aspose.Slides
Aspose.Slides for PHP via Java can load, modify, and save ODP presentations. You can edit slide text, add shapes and images, update formatting, and work with other presentation elements through the API.
The following example loads an ODP presentation, adds a rectangle containing text to its first slide, and saves the modified presentation as a new ODP file.
How to edit ODP in PHP
- Install Aspose.Slides for PHP via Java. See Installation.
- Configure Aspose.Slides in your PHP project.
- Load the ODP file with the
Presentationclass. - Access the first slide with
get_Item(0). - Add a rectangle with
addAutoShapeand set its text withsetText. - Call
savewith the output file path andSaveFormat::Odp.
Built with Aspose.Slides
Edit PPTX Files Online
The free Aspose.Slides Editor app is built with Aspose.Slides for PHP via Java, the same API as the code above. Open it and see what the API can do with your own PPTX files.
- Runs in your browser, nothing to install.
- See how Aspose.Slides handles your files before you write code.
- Upload your PPTX files and edit them instantly.
- Save and download the edited file.
Edit Other Files
You can also edit presentations in other supported formats.