Writers

ODPresentation

The name of the writer is ODPresentation.

$oWriter = IOFactory::createWriter($oPhpPresentation, 'PowerPoint2007');
$oWriter->save(__DIR__ . '/sample.pptx');

PowerPoint2007

The name of the writer is PowerPoint2007.

$oWriter = IOFactory::createWriter($oPhpPresentation, 'PowerPoint2007');
$oWriter->save(__DIR__ . '/sample.pptx');

You can change the ZIP Adapter for the writer. By default, the ZIP Adapter is ZipArchiveAdapter.

use PhpOffice\Common\Adapter\Zip\PclZipAdapter;
use PhpOffice\Common\Adapter\Zip\ZipArchiveAdapter;

$oWriter = IOFactory::createWriter($oPhpPresentation, 'PowerPoint2007');
$oWriter->setZipAdapter(PclZipAdapter);
$oWriter->save(__DIR__ . '/sample.pptx');

Serialized

The name of the writer is Serialized.

$oWriter = IOFactory::createWriter($oPhpPresentation, 'Serialized');
$oWriter->save(__DIR__ . '/sample.phppt');

You can change the ZIP Adapter for the writer. By default, the ZIP Adapter is ZipArchiveAdapter.

use PhpOffice\Common\Adapter\Zip\PclZipAdapter;
use PhpOffice\Common\Adapter\Zip\ZipArchiveAdapter;

$oWriter = IOFactory::createWriter($oPhpPresentation, 'Serialized');
$oWriter->setZipAdapter(PclZipAdapter);
$oWriter->save(__DIR__ . '/sample.phppt');