pptx 转换器到 svg 格式以与 canvas 一起使用

pptx converter to svg format to use with canvas

我已经开发了一些代码来开始读取 pptx 文件,现在我需要将此文件转换为 svg,我需要所有图表、形状、文本、图像对象,以便我可以与 canvas 一起使用.所以,如果有人知道任何包可以用 php 或 javascript 做到这一点,请给我建议。

非常感谢。

您可以使用 Aspose.Slides Cloud SDK for PHP 将演示文稿幻灯片转换为 SVG 图像。以下代码示例向您展示了如何执行此操作:

use Aspose\Slides\Cloud\Sdk\Api\Configuration;
use Aspose\Slides\Cloud\Sdk\Api\SlidesApi;

$configuration = new Configuration();
$configuration->setAppSid("my_client_id");
$configuration->setAppKey("my_client_secret");

$slidesApi = new SlidesApi(null, $configuration);

// Convert a presentation to SVG images.
$fileStream = fopen("example.pptx", "r");
$response = $slidesApi->convert($fileStream, "svg");

print("A ZIP file with the slides as SVG images was saved to " . $response->getPathname());

Aspose.Slides Cloud SDK 提供 REST-based API 用于管理演示文稿。这是一款付费产品,但您每月可以拨打 150 次免费 API 电话,以评估所有功能和您的用途。

您还可以使用免费的 Aspose Slides Online Converter 将 PowerPoint 演示文稿转换为其他格式。我在 Aspose 担任支持开发人员。