Convert SVG to PPT in PHP
Add an SVG image to a slide and save the presentation as a PowerPoint PPT file with Aspose.Slides for PHP via Java.
Convert SVG to PPT using PHP
To convert SVG to PPT, create a Presentation, add the SVG image to its first slide, and call save with SaveFormat::Ppt.
PHP code for converting SVG into PPT
$presentation = new Presentation();
try {
$slide = $presentation->getSlides()->get_Item(0);
$svgContent = file_get_contents("image.svg");
$svgImage = new SvgImage($svgContent);
$presentationImage = $presentation->getImages()->addImage($svgImage);
$slide->getShapes()->addPictureFrame(
ShapeType::Rectangle, 10, 10, 100, 100, $presentationImage);
$presentation->save("output.ppt", SaveFormat::Ppt);
} finally {
$presentation->dispose();
}Convert SVG to PPT in PHP
Aspose.Slides for PHP via Java can add an SVG image to a presentation slide and save the result as a PowerPoint PPT file with a few lines of PHP code.
Load the SVG content into a SvgImage, add it to the presentation image collection with addImage, place it on a slide with addPictureFrame, and save the presentation with SaveFormat::Ppt.
How to convert SVG to PPT using Aspose.Slides for PHP API
These are the steps to convert SVG to PPT in PHP.
- Install Aspose.Slides for PHP via Java.
- Configure Aspose.Slides in your PHP project.
- Create a
Presentation, access its first slide, and load the SVG content into aSvgImage. - Add the SVG image with
addPictureFrame, then callsavewithSaveFormat::Ppt.
Built with Aspose.Slides
Convert SVG to PPT Online
The free Aspose.Slides Conversion 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 SVG files.
- Runs in your browser, nothing to install.
- See how Aspose.Slides converts files before you write code.
- Upload SVG files and save them as PPT.
- Download the result or convert more files.
Convert SVG to Other Supported Formats
You can also convert SVG files and save them to other supported formats.