-
Notifications
You must be signed in to change notification settings - Fork 533
Closed
Milestone
Description
I'm trying to set a widescreen, 13.333" x 7.5" size for my PowerPoint document.
fFom the samples (and what I can understand from the source) this should work
$objPHPPowerPoint = new PhpPresentation();
$objPHPPowerPoint->getLayout()->setDocumentLayout(DocumentLayout::LAYOUT_CUSTOM)
->setCX(13.333,DocumentLayout::UNIT_INCH)
->setCY(7.5,DocumentLayout::UNIT_INCH);
but I get the following error
Fatal error: Uncaught TypeError: Cannot access offset of type string on string in
C:\...d\vendor\phpoffice\phppresentation\src\PhpPresentation\DocumentLayout.php:138
Stack trace:
#0 C:\...\pptx.php(30): PhpOffice\PhpPresentation\DocumentLayout->setDocumentLayout('custom')
#1 {main}
thrown in C:\...d\vendor\phpoffice\phppresentation\src\PhpPresentation\DocumentLayout.php on line 138
Using LAYOUT_SCREEN_16X9
and LAYOUT_OVERHEAD
don't throw an error in generation, but PowerPoint repairs the file on opening