PHPackages                             twilroad/presentation - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [PDF &amp; Document Generation](/categories/documents)
4. /
5. twilroad/presentation

ActiveLibrary[PDF &amp; Document Generation](/categories/documents)

twilroad/presentation
=====================

PHPPresentation - Read, Create and Write Presentations documents in PHP

0.10.0(7y ago)017LGPL-3.0-onlyPHPPHP &gt;=5.3.0

Since Jul 22Pushed 6y ago1 watchersCompare

[ Source](https://github.com/twilroad/presentation)[ Packagist](https://packagist.org/packages/twilroad/presentation)[ Docs](http://phpoffice.github.io)[ RSS](/packages/twilroad-presentation/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)Dependencies (8)Versions (14)Used By (0)

[![PHPPresentation](https://raw.githubusercontent.com/mvargasmoran/PHPPresentation/develop/docs/images/PHPPresentationLogo.png "PHPPresentation")](https://raw.githubusercontent.com/mvargasmoran/PHPPresentation/develop/docs/images/PHPPresentationLogo.png)
==============================================================================================================================================================================================================================================================

[](#)

[![Latest Stable Version](https://camo.githubusercontent.com/b9ce3c86e99f710af1e36946c773440cbbc68056e850b67ce0be02cc39b28340/68747470733a2f2f706f7365722e707567782e6f72672f7068706f66666963652f70687070726573656e746174696f6e2f762f737461626c652e706e67)](https://packagist.org/packages/phpoffice/phppresentation)[![Code Climate](https://camo.githubusercontent.com/b0c45c6517cbb426b921ed4ea36240c42360dd72ac2489687cd577fab117dc9d/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f5048504f66666963652f50485050726573656e746174696f6e2f6261646765732f6770612e737667)](https://codeclimate.com/github/PHPOffice/PHPPresentation)[![Test Coverage](https://camo.githubusercontent.com/41e14ff2a209ff846cdcf948b099540129972ce29ce522164acbb510d60aa619/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f5048504f66666963652f50485050726573656e746174696f6e2f6261646765732f636f7665726167652e737667)](https://codeclimate.com/github/PHPOffice/PHPPresentation/coverage)[![Total Downloads](https://camo.githubusercontent.com/c450b9b30217af78282f0b2b7cdf40b21034c2468a97c03ebe19e7df5978f93c/68747470733a2f2f706f7365722e707567782e6f72672f7068706f66666963652f70687070726573656e746174696f6e2f646f776e6c6f6164732e706e67)](https://packagist.org/packages/phpoffice/phppresentation)[![License](https://camo.githubusercontent.com/0206eeeb2f9ada3a200001077516b44d2e2df07ea4879f8b7c5a4a074eda0e8c/68747470733a2f2f706f7365722e707567782e6f72672f7068706f66666963652f70687070726573656e746174696f6e2f6c6963656e73652e706e67)](https://packagist.org/packages/phpoffice/phppresentation)[![BountySource](https://camo.githubusercontent.com/c0bdfd4f9b30445b050fdc4c6244824a3778d41b776eb0a5c53c2b01f1ec6556/68747470733a2f2f696d672e736869656c64732e696f2f626f756e7479736f757263652f7465616d2f7068706f66666963652f61637469766974792e737667)](https://www.bountysource.com/teams/phpoffice)[![Join the chat at https://gitter.im/PHPOffice/PHPPresentation](https://camo.githubusercontent.com/2dd4d0f228a76b3dd73355d3fb9101cd32fb849421b528669a9a7bbec7d5a25a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4749545445522d6a6f696e253230636861742d677265656e2e737667)](https://gitter.im/PHPOffice/PHPPresentation)

Branch Master : [![Build Status](https://camo.githubusercontent.com/73d8a4bf8cfe844e0bf5cc39945db9b4b56c833bcfcdfefd290a09e94ddc9e0a/68747470733a2f2f7472617669732d63692e6f72672f5048504f66666963652f50485050726573656e746174696f6e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/PHPOffice/PHPPresentation) [![Documentation Status](https://camo.githubusercontent.com/2e36d1ef626809d2aad1a263fa1f1bfb55c93f150e0f50b7a2ce6d6af6a7c9f9/68747470733a2f2f72656164746865646f63732e6f72672f70726f6a656374732f70687070726573656e746174696f6e2f62616467652f3f76657273696f6e3d6d6173746572)](http://phppresentation.readthedocs.io/en/latest/?badge=master)Branch Develop : [![Build Status](https://camo.githubusercontent.com/3cdb92015f467e78f17d4364d9a27798af1acf9039e17662127b1e44075943fe/68747470733a2f2f7472617669732d63692e6f72672f5048504f66666963652f50485050726573656e746174696f6e2e7376673f6272616e63683d646576656c6f70)](https://travis-ci.org/PHPOffice/PHPPresentation) [![Documentation Status](https://camo.githubusercontent.com/fa3fd880fa12b07d128b2d1305222b25a857a92143a3abc41551da0f9f32c184/68747470733a2f2f72656164746865646f63732e6f72672f70726f6a656374732f70687070726573656e746174696f6e2f62616467652f3f76657273696f6e3d646576656c6f70)](http://phppresentation.readthedocs.io/en/latest/?badge=develop)

PHPPresentation is a library written in pure PHP that provides a set of classes to write to different presentation file formats, i.e. Microsoft [Office Open XML](http://en.wikipedia.org/wiki/Office_Open_XML) (OOXML or OpenXML) or OASIS [Open Document Format for Office Applications](http://en.wikipedia.org/wiki/OpenDocument) (OpenDocument or ODF).

PHPPresentation is an open source project licensed under the terms of [LGPL version 3](https://github.com/PHPOffice/PHPPresentation/blob/develop/COPYING.LESSER). PHPPresentation is aimed to be a high quality software product by incorporating [continuous integration](https://travis-ci.org/PHPOffice/PHPPresentation) and [unit testing](http://phpoffice.github.io/PHPPresentation/coverage/develop/). You can learn more about PHPPresentation by reading the [Developers' Documentation](http://phppresentation.readthedocs.org/) and the [API Documentation](http://phpoffice.github.io/PHPPresentation/docs/develop/).

Read more about PHPPresentation:

- [Features](#features)
- [Requirements](#requirements)
- [Installation](#installation)
- [Getting started](#getting-started)
- [Contributing](#contributing)
- [Developers' Documentation](http://phppresentation.readthedocs.org/)
- [API Documentation](http://phpoffice.github.io/PHPPresentation/docs/master/)

### Features

[](#features)

- Create an in-memory presentation representation
- Set presentation meta data (author, title, description, etc)
- Add slides from scratch or from existing one
- Supports different fonts and font styles
- Supports different formatting, styles, fills, gradients
- Supports hyperlinks and rich-text strings
- Add images with different styles (positioning, rotation, shadow)
- Set printing options (header, footer, page margins, paper size, orientation)
- Set transitions between slides
- Output to different file formats: PowerPoint 2007 (.pptx), OpenDocument Presentation (.odp), Serialized Presentation)
- ... and lots of other things!

### Requirements

[](#requirements)

PHPPresentation requires the following:

- PHP 5.3+
- [Zip extension](http://php.net/manual/en/book.zip.php)
- [XML Parser extension](http://www.php.net/manual/en/xml.installation.php)
- [XMLWriter extension](http://php.net/manual/en/book.xmlwriter.php) (optional, used to write DOCX and ODT)
- [GD](http://php.net/manual/en/book.image.php)

### Installation

[](#installation)

#### Composer method

[](#composer-method)

It is recommended that you install the PHPPresentation library [through composer](http://getcomposer.org/). To do so, add the following lines to your `composer.json`.

```
{
    "require": {
       "phpoffice/phppresentation": "dev-master"
    }
}
```

#### Manual download method

[](#manual-download-method)

Alternatively, you can download the latest release from the [releases page](https://github.com/PHPOffice/PHPPresentation/releases). In this case, you will have to register the autoloader. (Register autoloading is required only if you do not use composer in your project.)

```
require_once 'path/to/PhpPresentation/src/PhpPresentation/Autoloader.php';
\PhpOffice\PhpPresentation\Autoloader::register();
```

You will also need to download the latest PHPOffice/Common release from its [releases page](https://github.com/PHPOffice/Common/releases). And you will also have to register its autoloader, too.

```
require_once 'path/to/PhpOffice/Common/src/Common/Autoloader.php';
\PhpOffice\Common\Autoloader::register();
```

Getting started
---------------

[](#getting-started)

The following is a basic usage example of the PHPPresentation library.

```
// with your own install
require_once 'src/PhpPresentation/Autoloader.php';
\PhpOffice\PhpPresentation\Autoloader::register();
require_once 'src/Common/Autoloader.php';
\PhpOffice\Common\Autoloader::register();

// with Composer
require_once 'vendor/autoload.php';

use PhpOffice\PhpPresentation\PhpPresentation;
use PhpOffice\PhpPresentation\IOFactory;
use PhpOffice\PhpPresentation\Style\Color;
use PhpOffice\PhpPresentation\Style\Alignment;

$objPHPPowerPoint = new PhpPresentation();

// Create slide
$currentSlide = $objPHPPowerPoint->getActiveSlide();

// Create a shape (drawing)
$shape = $currentSlide->createDrawingShape();
$shape->setName('PHPPresentation logo')
      ->setDescription('PHPPresentation logo')
      ->setPath('./resources/phppowerpoint_logo.gif')
      ->setHeight(36)
      ->setOffsetX(10)
      ->setOffsetY(10);
$shape->getShadow()->setVisible(true)
                   ->setDirection(45)
                   ->setDistance(10);

// Create a shape (text)
$shape = $currentSlide->createRichTextShape()
      ->setHeight(300)
      ->setWidth(600)
      ->setOffsetX(170)
      ->setOffsetY(180);
$shape->getActiveParagraph()->getAlignment()->setHorizontal( Alignment::HORIZONTAL_CENTER );
$textRun = $shape->createTextRun('Thank you for using PHPPresentation!');
$textRun->getFont()->setBold(true)
                   ->setSize(60)
                   ->setColor( new Color( 'FFE06B20' ) );

$oWriterPPTX = IOFactory::createWriter($objPHPPowerPoint, 'PowerPoint2007');
$oWriterPPTX->save(__DIR__ . "/sample.pptx");
$oWriterODP = IOFactory::createWriter($objPHPPowerPoint, 'ODPresentation');
$oWriterODP->save(__DIR__ . "/sample.odp");
```

More examples are provided in the [samples folder](samples/). You can also read the [Developers' Documentation](http://phppresentation.readthedocs.org/) and the [API Documentation](http://phpoffice.github.io/PHPPresentation/docs/master/) for more detail.

Contributing
------------

[](#contributing)

We welcome everyone to contribute to PHPPresentation. Below are some of the things that you can do to contribute:

- Read [our contributing guide](https://github.com/PHPOffice/PHPPresentation/blob/master/CONTRIBUTING.md)
- [Fork us](https://github.com/PHPOffice/PHPPresentation/fork) and [request a pull](https://github.com/PHPOffice/PHPPresentation/pulls) to the [develop](https://github.com/PHPOffice/PHPPresentation/tree/develop) branch
- Submit [bug reports or feature requests](https://github.com/PHPOffice/PHPPresentation/issues) to GitHub
- Follow [@PHPOffice](https://twitter.com/PHPOffice) on Twitter

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 78.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~243 days

Recently: every ~289 days

Total

8

Last Release

2607d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e22415b15f1e14b0da8e36df8d31f983962d0d57e83af78da61100d7238947ae?d=identicon)[twilroad](/maintainers/twilroad)

---

Top Contributors

[![Progi1984](https://avatars.githubusercontent.com/u/1533248?v=4)](https://github.com/Progi1984 "Progi1984 (664 commits)")[![ivanlanin](https://avatars.githubusercontent.com/u/15313?v=4)](https://github.com/ivanlanin "ivanlanin (40 commits)")[![maartenba](https://avatars.githubusercontent.com/u/485230?v=4)](https://github.com/maartenba "maartenba (21 commits)")[![jrking4](https://avatars.githubusercontent.com/u/1873583?v=4)](https://github.com/jrking4 "jrking4 (15 commits)")[![twilroad](https://avatars.githubusercontent.com/u/5193767?v=4)](https://github.com/twilroad "twilroad (12 commits)")[![chriskapp](https://avatars.githubusercontent.com/u/2505846?v=4)](https://github.com/chriskapp "chriskapp (10 commits)")[![vincentKool](https://avatars.githubusercontent.com/u/233981?v=4)](https://github.com/vincentKool "vincentKool (8 commits)")[![joshuadoss](https://avatars.githubusercontent.com/u/29265?v=4)](https://github.com/joshuadoss "joshuadoss (8 commits)")[![pgee70](https://avatars.githubusercontent.com/u/5938974?v=4)](https://github.com/pgee70 "pgee70 (6 commits)")[![carusogabriel](https://avatars.githubusercontent.com/u/16328050?v=4)](https://github.com/carusogabriel "carusogabriel (5 commits)")[![danielbair](https://avatars.githubusercontent.com/u/1430175?v=4)](https://github.com/danielbair "danielbair (5 commits)")[![bjo3rnf](https://avatars.githubusercontent.com/u/1183009?v=4)](https://github.com/bjo3rnf "bjo3rnf (5 commits)")[![delphiki](https://avatars.githubusercontent.com/u/303778?v=4)](https://github.com/delphiki "delphiki (4 commits)")[![kw-pr](https://avatars.githubusercontent.com/u/9133572?v=4)](https://github.com/kw-pr "kw-pr (4 commits)")[![tcitworld](https://avatars.githubusercontent.com/u/2197836?v=4)](https://github.com/tcitworld "tcitworld (4 commits)")[![jamesggordon](https://avatars.githubusercontent.com/u/650785?v=4)](https://github.com/jamesggordon "jamesggordon (3 commits)")[![mrjbtc](https://avatars.githubusercontent.com/u/12045341?v=4)](https://github.com/mrjbtc "mrjbtc (3 commits)")[![derekrcohen2](https://avatars.githubusercontent.com/u/3650826?v=4)](https://github.com/derekrcohen2 "derekrcohen2 (3 commits)")[![JewrassicPark](https://avatars.githubusercontent.com/u/3650826?v=4)](https://github.com/JewrassicPark "JewrassicPark (3 commits)")[![jvanoostrom](https://avatars.githubusercontent.com/u/8863965?v=4)](https://github.com/jvanoostrom "jvanoostrom (2 commits)")

---

Tags

phppptxPowerPointpptodppresentationsLibreOffice

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/twilroad-presentation/health.svg)

```
[![Health](https://phpackages.com/badges/twilroad-presentation/health.svg)](https://phpackages.com/packages/twilroad-presentation)
```

###  Alternatives

[phpoffice/phppresentation

PHPPresentation - Read, Create and Write Presentations documents in PHP

1.4k2.4M25](/packages/phpoffice-phppresentation)[gotenberg/gotenberg-php

A PHP client for interacting with Gotenberg, a developer-friendly API for converting numerous document formats into PDF files, and more!

3685.2M19](/packages/gotenberg-gotenberg-php)[vaites/php-apache-tika

Apache Tika bindings for PHP: extracts text from documents and images (with OCR), metadata and more...

1171.5M2](/packages/vaites-php-apache-tika)[daandesmedt/phpheadlesschrome

A PHP wrapper for using Google Chrome Headless mode. Convert URL or HTML to a PDF / screenshot. Easy to use and OOP interfaced.

92233.1k](/packages/daandesmedt-phpheadlesschrome)[kiwilan/php-ebook

PHP package to read metadata and extract covers from eBooks, comics and audiobooks.

3414.6k1](/packages/kiwilan-php-ebook)[irebega/docx-replacer

PHP extension that allow you replace text to text or text to image in DOCX file

1432.1k](/packages/irebega-docx-replacer)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
