0

I want to make image from ppt/pptx. I can read ppt by using PHPOffice/PHPPresentation, but I can't convert it into images.

require_once 'src/PhpPresentation/Autoloader.php';
\PhpOffice\PhpPresentation\Autoloader::register();
require_once 'src/Common/Autoloader.php';
\PhpOffice\Common\Autoloader::register();


 use PhpOffice\PhpPresentation\IOFactory;



 use PhpOffice\PhpPresentation\Shape\Media;


  $oReader = IOFactory::createReader('PowerPoint2007');


    $readPPTX = $oReader->load(__DIR__ . '/sample.pptx');


 $oWriterPPTX = IOFactory::createWriter($readPPTX, 'PowerPoint2007');

 print_r($oWriterPPTX);

  //$oWriterPPTX->save(__DIR__ . "/output.pptx");
Joseph Cho
  • 4,033
  • 4
  • 26
  • 33

1 Answers1

0

An issue ever exists for creating a writer which converts slides to images : https://github.com/PHPOffice/PHPPresentation/issues/224

But the project is open to pull requests.

Progi1984
  • 498
  • 3
  • 12