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 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.
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();
}
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.
Free Online Converter
Convert SVG to Other Supported Formats
You can also convert SVG files and save them to other supported formats.