|
1 |
| -# PHPPowerPoint Manual |
| 1 | + |
| 2 | + |
| 3 | +# Developer Documentation |
| 4 | + |
| 5 | +***Version 0.2.0*** |
2 | 6 |
|
3 | 7 | 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.
|
4 | 8 |
|
@@ -287,18 +291,44 @@ Properties:
|
287 | 291 |
|
288 | 292 | #### Color
|
289 | 293 |
|
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 | +``` |
291 | 300 |
|
292 | 301 | ## Writers
|
293 | 302 |
|
| 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 | + |
294 | 310 | ### OOXML
|
295 | 311 |
|
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 | +``` |
297 | 318 |
|
298 | 319 | ### OpenDocument
|
299 | 320 |
|
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 | +``` |
301 | 327 |
|
302 | 328 | ## References
|
303 | 329 |
|
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) |
0 commit comments