These are chat archives for PHPOffice/PHPPresentation

15th
Mar 2018
slolo2000
@slolo2000
Mar 15 2018 14:21

Hello, when trying to load pptx file I have the following error:
Warning: imagecreatefromstring(): Data is not in a recognized format in D:\Test\vendor\phpoffice\phppresentation\src\PhpPresentation\Reader\PowerPoint2007.php on line 731
Warning: imagesx() expects parameter 1 to be resource, boolean given in D:\Test\vendor\phpoffice\phppresentation\src\PhpPresentation\Shape\Drawing\Gd.php on line 78
Warning: imagesy() expects parameter 1 to be resource, boolean given in D:\Test\vendor\phpoffice\phppresentation\src\PhpPresentation\Shape\Drawing\Gd.php on line 79

In fact, in the pptx file there is an "image". I suspect that this image was paste from a Word document because when I save it from pptx file, PowerPoint save it as .emf file
So, is PhpPresentation really support this type of object?

Otherwise, do I have to load document like this (with @ in order to skip warning):
$docPpt = @PhpPresentation\IOFactory::load($inputFileName);

Thanks in advance and have a nice day.