Skip to content

Commit 8d69b2f

Browse files
committed
#226 : PowerPoint2007 Reader : Support of Slide Note
1 parent 3ae7102 commit 8d69b2f

File tree

6 files changed

+450
-510
lines changed

6 files changed

+450
-510
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
### Features
1616
- ODPresentation Writer : Show/Hide Value / Name / Series Name in Chart - @Progi1984 GH-272
1717
- ODPresentation Writer : Axis Bounds in Chart - @Progi1984 GH-269
18-
- PowerPoint2007 Reader : Support of Table - @Progi1984 GH-240
18+
- PowerPoint2007 Reader : Support of Shape Table - @Progi1984 GH-240
19+
- PowerPoint2007 Reader : Support of Slide Note - @Progi1984 GH-226
1920
- PowerPoint2007 Writer : Implement character spacing - @jvanoostrom GH-301
2021
- PowerPoint2007 Writer : Axis Bounds in Chart - @Progi1984 GH-269
2122
- PowerPoint2007 Writer : Implement Legend Key in Series for Chart - @Progi1984 GH-319

samples/Sample_12_Reader_PowerPoint2007.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
use PhpOffice\PhpPresentation\Shape\RichText;
1010

1111
$pptReader = IOFactory::createReader('PowerPoint2007');
12-
$oPHPPresentation = $pptReader->load('resources/Sample_12.pptx');
12+
$oPHPPresentation = $pptReader->load('results/Sample_01_Simple.pptx');
1313

1414
$oTree = new PhpPptTree($oPHPPresentation);
1515
echo $oTree->display();

samples/Sample_Header.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@
8686
* @param \PhpOffice\PhpPresentation\PhpPresentation $phpPresentation
8787
* @param string $filename
8888
* @param array $writers
89+
* @return string
8990
*/
9091
function write($phpPresentation, $filename, $writers)
9192
{
@@ -113,6 +114,7 @@ function write($phpPresentation, $filename, $writers)
113114
* Get ending notes
114115
*
115116
* @param array $writers
117+
* @return string
116118
*/
117119
function getEndingNotes($writers)
118120
{
@@ -296,6 +298,14 @@ protected function displayPhpPresentationInfo(PhpPresentation $oPHPPpt)
296298
$this->append('<dt>Background Image</dt><dd><img src="data:image/png;base64,'.base64_encode($sBkgImgContents).'"></dd>');
297299
}
298300
}
301+
$oNote = $oSlide->getNote();
302+
foreach ($oNote->getShapeCollection() as $oShape) {
303+
$this->append('<dt>Notes</dt>');
304+
if ($oShape instanceof RichText) {
305+
$this->append('<dd>' . $oShape->getPlainText() . '</dd>');
306+
}
307+
}
308+
299309
$this->append('</dl>');
300310
$this->append('</div>');
301311

0 commit comments

Comments
 (0)