Skip to content

Commit 403cffa

Browse files
committed
ODPresentation Reader : Initial Commit - GH-113
1 parent cf6ed03 commit 403cffa

File tree

9 files changed

+984
-29
lines changed

9 files changed

+984
-29
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
### Features
55
- PowerPoint2007 Reader : Initial Commit - @Progi1984 GH-44
6+
- ODPresentation Reader : Initial Commit - @Progi1984 GH-113
67

78
### Bugfix
89
- Fixed the sample in Readme.md - @Progi1984 GH-114
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php
2+
3+
set_time_limit(10);
4+
5+
include_once 'Sample_Header.php';
6+
7+
use PhpOffice\PhpPresentation\PhpPresentation;
8+
use PhpOffice\PhpPresentation\DocumentLayout;
9+
use PhpOffice\PhpPresentation\IOFactory;
10+
use PhpOffice\PhpPresentation\Style\Alignment;
11+
use PhpOffice\PhpPresentation\Style\Color;
12+
use PhpOffice\PhpPresentation\Slide;
13+
use PhpOffice\PhpPresentation\AbstractShape;
14+
use PhpOffice\PhpPresentation\Shape\MemoryDrawing;
15+
use PhpOffice\PhpPresentation\Shape\RichText;
16+
use PhpOffice\PhpPresentation\Shape\Group;
17+
18+
$pptReader = IOFactory::createReader('ODPresentation');
19+
$oPHPPresentation = $pptReader->load('resources/Sample_12.odp');
20+
21+
$oTree = new PhpPptTree($oPHPPresentation);
22+
echo $oTree->display();
23+
if (!CLI) {
24+
include_once 'Sample_Footer.php';
25+
}

samples/resources/Sample_12.odp

11.8 KB
Binary file not shown.

src/PhpPresentation/IOFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class IOFactory
2727
*
2828
* @var array
2929
*/
30-
private static $autoResolveClasses = array('Serialized', 'PowerPoint97', 'PowerPoint2007');
30+
private static $autoResolveClasses = array('Serialized', 'ODPresentation', 'PowerPoint97', 'PowerPoint2007');
3131

3232
/**
3333
* Create writer

0 commit comments

Comments
 (0)