Skip to content

Commit 4d4a204

Browse files
committed
Doc: Writers documentation
1 parent 68e67eb commit 4d4a204

File tree

3 files changed

+36
-6
lines changed

3 files changed

+36
-6
lines changed

Documentation/PHPPowerPointManual.md renamed to Documentation/PHPPowerPointDocumentation.md

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
# PHPPowerPoint Manual
1+
![PHPPowerPoint](https://github.com/PHPOffice/PHPPowerPoint/raw/master/Documentation/assets/PHPPowerPointLogo.png "PHPPowerPoint")
2+
3+
# Developer Documentation
4+
5+
***Version 0.2.0***
26

37
PHPPowerPoint is a library written in pure PHP that provides a set of classes to write to different presentation file formats, i.e. OpenXML (.pptx) and OpenDocument (.odp). PHPPowerPoint is an open source project licensed under LGPL.
48

@@ -287,18 +291,44 @@ Properties:
287291

288292
#### Color
289293

290-
To be completed.
294+
Colors can be applied to different objects, e.g. font or border.
295+
296+
```php
297+
$textRun = $shape->createTextRun('Text');
298+
$textRun->getFont()->setColor(new PHPPowerPoint_Style_Color('C00000'));
299+
```
291300

292301
## Writers
293302

303+
Use the `IOFactory` object to write resulting presentation to a file.
304+
305+
```php
306+
$writer = PHPPowerPoint_IOFactory::createWriter($phpPowerPoint, $writerName);
307+
$writer->save('/path/to/result.document');
308+
```
309+
294310
### OOXML
295311

296-
To be completed.
312+
Use `PowerPoint2007` for `$writerName`.
313+
314+
```php
315+
$writer = PHPPowerPoint_IOFactory::createWriter($phpPowerPoint, 'PowerPoint2007');
316+
$writer->save('/path/to/result.pptx');
317+
```
297318

298319
### OpenDocument
299320

300-
To be completed.
321+
Use `ODPresentation` for `$writerName`.
322+
323+
```php
324+
$writer = PHPPowerPoint_IOFactory::createWriter($phpPowerPoint, 'ODPresentation');
325+
$writer->save('/path/to/result.odp');
326+
```
301327

302328
## References
303329

304-
To be completed.
330+
* [ISO/IEC 29500-1 Office Open XML File Formats](http://standards.iso.org/ittf/PubliclyAvailableStandards/c061750_ISO_IEC_29500-1_2012.zip) (2012)
331+
* [Open Document Format for Office Applications (OpenDocument) Version 1.2](https://www.oasis-open.org/standards#opendocumentv1.2) (2011)
332+
* [Ecma TC45 Office Open XML File Formats Standard](http://www.ecma-international.org/news/TC45_current_work/TC45_available_docs.htm) (2006)
333+
* [OpenXML Explained](http://openxmldeveloper.org/blog/b/openxmldeveloper/archive/2007/08/13/1970.aspx) (2007)
334+
* [OASIS OpenDocument Essentials](http://books.evc-cit.info/odbook/book.html) (2005)
-2.32 KB
Loading

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ $phpPowerPoint = new PHPPowerPoint();
4242

4343
### Want to learn more?
4444

45-
[Read the manual](Documentation/PHPPowerPointManual.md).
45+
[Read the manual](Documentation/PHPPowerPointDocumentation.md).
4646

4747
### Want to contribute?
4848

0 commit comments

Comments
 (0)