You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if I have an Office365 edited PPTX with no notes, I am able to open and enumerate the slides with no issue.
if however I have notes on the slides I get the error below.
Able to repro using the sample_12.pptx from here (before works fine, add a simple letter to the Notes on slide1 and it breaks. removing the Note doesn't help).
require_once 'vendor/autoload.php';
use PhpOffice\PhpPresentation\IOFactory;
$oReader = \PhpOffice\PhpPresentation\IOFactory::createReader('PowerPoint2007');
$oPresentation04 = $oReader->load('Sample_12.pptx');
Fatal error: Uncaught TypeError: PhpOffice\PhpPresentation\Reader\PowerPoint2007::loadShapeRichText(): Argument #3 ($oSlide) must be of type PhpOffice\PhpPresentation\Slide\AbstractSlide, PhpOffice\PhpPresentation\Slide\Note given, called in C:\AP-Web\engine-word\vendor\phpoffice\phppresentation\src\PhpPresentation\Reader\PowerPoint2007.php on line 1375 and defined in C:\AP-Web\engine-word\vendor\phpoffice\phppresentation\src\PhpPresentation\Reader\PowerPoint2007.php:888
Stack trace:
#0 C:\AP-Web\engine-word\vendor\phpoffice\phppresentation\src\PhpPresentation\Reader\PowerPoint2007.php(1375): PhpOffice\PhpPresentation\Reader\PowerPoint2007->loadShapeRichText(Object(PhpOffice\Common\XMLReader), Object(DOMElement), Object(PhpOffice\PhpPresentation\Slide\Note)) #1 C:\AP-Web\engine-word\vendor\phpoffice\phppresentation\src\PhpPresentation\Reader\PowerPoint2007.php(755): PhpOffice\PhpPresentation\Reader\PowerPoint2007->loadSlideShapes(Object(PhpOffice\PhpPresentation\Slide\Note), Object(DOMNodeList), Object(PhpOffice\Common\XMLReader)) #2 C:\AP-Web\engine-word\vendor\phpoffice\phppresentation\src\PhpPresentation\Reader\PowerPoint2007.php(369): PhpOffice\PhpPresentation\Reader\PowerPoint2007->loadSlideNote('notesSlide1.xml', Object(PhpOffice\PhpPresentation\Slide)) #3 C:\AP-Web\engine-word\vendor\phpoffice\phppresentation\src\PhpPresentation\Reader\PowerPoint2007.php(169): PhpOffice\PhpPresentation\Reader\PowerPoint2007->loadSlides('<?xml version="...') #4 C:\AP-Web\engine-word\vendor\phpoffice\phppresentation\src\PhpPresentation\Reader\PowerPoint2007.php(136): PhpOffice\PhpPresentation\Reader\PowerPoint2007->loadFile('Sample_12.pptx') #5 C:\AP-Web\engine-word\pptx_read.php(6): PhpOffice\PhpPresentation\Reader\PowerPoint2007->load('Sample_12.pptx') #6 {main}
thrown in C:\AP-Web\engine-word\vendor\phpoffice\phppresentation\src\PhpPresentation\Reader\PowerPoint2007.php on line 888
The text was updated successfully, but these errors were encountered:
following these fixes did allow the PPTX to be opened, but unable to successfully read the notes in the opened file, and using it as a source for addExternalFile results in an output in need of repair :(
if I have an Office365 edited PPTX with no notes, I am able to open and enumerate the slides with no issue.
if however I have notes on the slides I get the error below.
Able to repro using the sample_12.pptx from here (before works fine, add a simple letter to the Notes on slide1 and it breaks. removing the Note doesn't help).
Fatal error: Uncaught TypeError: PhpOffice\PhpPresentation\Reader\PowerPoint2007::loadShapeRichText(): Argument #3 ($oSlide) must be of type PhpOffice\PhpPresentation\Slide\AbstractSlide, PhpOffice\PhpPresentation\Slide\Note given, called in C:\AP-Web\engine-word\vendor\phpoffice\phppresentation\src\PhpPresentation\Reader\PowerPoint2007.php on line 1375 and defined in C:\AP-Web\engine-word\vendor\phpoffice\phppresentation\src\PhpPresentation\Reader\PowerPoint2007.php:888
Stack trace:
#0 C:\AP-Web\engine-word\vendor\phpoffice\phppresentation\src\PhpPresentation\Reader\PowerPoint2007.php(1375): PhpOffice\PhpPresentation\Reader\PowerPoint2007->loadShapeRichText(Object(PhpOffice\Common\XMLReader), Object(DOMElement), Object(PhpOffice\PhpPresentation\Slide\Note))
#1 C:\AP-Web\engine-word\vendor\phpoffice\phppresentation\src\PhpPresentation\Reader\PowerPoint2007.php(755): PhpOffice\PhpPresentation\Reader\PowerPoint2007->loadSlideShapes(Object(PhpOffice\PhpPresentation\Slide\Note), Object(DOMNodeList), Object(PhpOffice\Common\XMLReader))
#2 C:\AP-Web\engine-word\vendor\phpoffice\phppresentation\src\PhpPresentation\Reader\PowerPoint2007.php(369): PhpOffice\PhpPresentation\Reader\PowerPoint2007->loadSlideNote('notesSlide1.xml', Object(PhpOffice\PhpPresentation\Slide))
#3 C:\AP-Web\engine-word\vendor\phpoffice\phppresentation\src\PhpPresentation\Reader\PowerPoint2007.php(169): PhpOffice\PhpPresentation\Reader\PowerPoint2007->loadSlides('<?xml version="...')
#4 C:\AP-Web\engine-word\vendor\phpoffice\phppresentation\src\PhpPresentation\Reader\PowerPoint2007.php(136): PhpOffice\PhpPresentation\Reader\PowerPoint2007->loadFile('Sample_12.pptx')
#5 C:\AP-Web\engine-word\pptx_read.php(6): PhpOffice\PhpPresentation\Reader\PowerPoint2007->load('Sample_12.pptx')
#6 {main}
thrown in C:\AP-Web\engine-word\vendor\phpoffice\phppresentation\src\PhpPresentation\Reader\PowerPoint2007.php on line 888
The text was updated successfully, but these errors were encountered: