Skip to content

Commit

Permalink
PHPOffice#226 : PowerPoint2007 Reader : Support of Slide Note
Browse files Browse the repository at this point in the history
  • Loading branch information
Progi1984 committed Mar 5, 2017
1 parent 3ae7102 commit 8d69b2f
Show file tree
Hide file tree
Showing 6 changed files with 450 additions and 510 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
### Features
- ODPresentation Writer : Show/Hide Value / Name / Series Name in Chart - @Progi1984 GH-272
- ODPresentation Writer : Axis Bounds in Chart - @Progi1984 GH-269
- PowerPoint2007 Reader : Support of Table - @Progi1984 GH-240
- PowerPoint2007 Reader : Support of Shape Table - @Progi1984 GH-240
- PowerPoint2007 Reader : Support of Slide Note - @Progi1984 GH-226
- PowerPoint2007 Writer : Implement character spacing - @jvanoostrom GH-301
- PowerPoint2007 Writer : Axis Bounds in Chart - @Progi1984 GH-269
- PowerPoint2007 Writer : Implement Legend Key in Series for Chart - @Progi1984 GH-319
Expand Down
2 changes: 1 addition & 1 deletion samples/Sample_12_Reader_PowerPoint2007.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
use PhpOffice\PhpPresentation\Shape\RichText;

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

$oTree = new PhpPptTree($oPHPPresentation);
echo $oTree->display();
Expand Down
10 changes: 10 additions & 0 deletions samples/Sample_Header.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
* @param \PhpOffice\PhpPresentation\PhpPresentation $phpPresentation
* @param string $filename
* @param array $writers
* @return string
*/
function write($phpPresentation, $filename, $writers)
{
Expand Down Expand Up @@ -113,6 +114,7 @@ function write($phpPresentation, $filename, $writers)
* Get ending notes
*
* @param array $writers
* @return string
*/
function getEndingNotes($writers)
{
Expand Down Expand Up @@ -296,6 +298,14 @@ protected function displayPhpPresentationInfo(PhpPresentation $oPHPPpt)
$this->append('<dt>Background Image</dt><dd><img src="data:image/png;base64,'.base64_encode($sBkgImgContents).'"></dd>');
}
}
$oNote = $oSlide->getNote();
foreach ($oNote->getShapeCollection() as $oShape) {
$this->append('<dt>Notes</dt>');
if ($oShape instanceof RichText) {
$this->append('<dd>' . $oShape->getPlainText() . '</dd>');
}
}

$this->append('</dl>');
$this->append('</div>');

Expand Down
Loading

0 comments on commit 8d69b2f

Please sign in to comment.