I am trying to use PhpPresentation to read a sample.pptx
file using the simple instructions for readers in their docs and I am getting:
imagecreatefromstring(): Data is not in a recognized format
I have checked that I have PHP7.2-gd installed and all of the other dependencies.
My Code:
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);
Can anybody help me understand the issue?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With