标签: phppresentation

PhpPresentation imagecreatefromstring():数据不是可识别的格式 - PHP7.2

我正在尝试使用PhpPresentation sample.pptx在他们的文档中使用读者的简单说明来阅读文件,我得到:

imagecreatefromstring(): Data is not in a recognized format

我已经检查过我安装了PHP7.2-gd以及所有其他依赖项.

我的代码:

require_once 'vendor/autoload.php';

use \PhpOffice\PhpPresentation\PhpPresentation;
use \PhpOffice\PhpPresentation\IOFactory;
use \PhpOffice\PhpPresentation\Style\Color;
use \PhpOffice\PhpPresentation\Style\Alignment;

$oReader = IOFactory::createReader('PowerPoint2007');
$data = $oReader->load(__DIR__ . '/sample.pptx');
var_dump($data);
Run Code Online (Sandbox Code Playgroud)

任何人都可以帮我理解这个问题吗?

php phppresentation

8
推荐指数
1
解决办法
707
查看次数

标签 统计

php ×1

phppresentation ×1