I am using PHPPresentation for the first time and everything works fine, but I don't want to save file to some destination, I want to download that file through web browser. How to do that?
Please help.
This is code to save file on some destination
$oWriterPPTX = IOFactory::createWriter($objPHPPresentation, 'PowerPoint2007');
$oWriterPPTX->save(__DIR__ . "/sample.pptx");
Try this code
header("Content-Type: application/vnd.openxmlformats-officedocument.presentationml.presentation");
header("Content-Disposition: attachment; filename=test.pptx");
$oWriterPPTX = IOFactory::createWriter($this->objPhpPresentation,'PowerPoint2007' );
$oWriterPPTX->save('php://output');