PHPPresentation icon indicating copy to clipboard operation
PHPPresentation copied to clipboard

How can I read a PPTX file using PHPPresentation ?

Open biswa34 opened this issue 4 years ago • 1 comments

@Progi1984
I am getting this after trying to read from a .pptx. Actually I want to show pptx on browser. But this gives me this weird output. Here is my code:

 $inputFileName = public_path('asset/docs/filename.pptx');

        /** Load $inputFileName to a Spreadsheet Object  **/

        $ppt = \PhpOffice\PhpPresentation\IOFactory::load($inputFileName);
        $writer = \PhpOffice\PhpPresentation\IOFactory::createWriter($ppt, 'PowerPoint2007');
        $message = $writer->save('php://output');

Kindly help ASAP !!

Screenshot_1

biswa34 avatar Sep 14 '20 16:09 biswa34