PHPackages                             gogo/phppresentation - 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. [File &amp; Storage](/categories/file-storage)
4. /
5. gogo/phppresentation

ActiveLibrary[File &amp; Storage](/categories/file-storage)

gogo/phppresentation
====================

PHPPresentation - Read, Create and Write Presentations documents in PHP

v0.2(4y ago)04LGPL-3.0-onlyPHPPHP ^7.1|^8.0

Since Jun 22Pushed 4y ago1 watchersCompare

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

READMEChangelog (2)Dependencies (5)Versions (3)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)[![Coverage Status](https://camo.githubusercontent.com/fc820d53e0503049eec57198019dcff16c871e6838b2544cf54ea9f25ab8e91a/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f5048504f66666963652f50485050726573656e746174696f6e2f62616467652e7376673f6272616e63683d646576656c6f70)](https://coveralls.io/github/PHPOffice/PHPPresentation?branch=develop)[![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/38170fcad3e9b9be2fac4262ae6bef3f386defc564424ad596336d2911e6b453/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4769747465722d6a6f696e253230636861742d677265656e2e737667)](https://gitter.im/PHPOffice/PHPPresentation)

Branch Master : [![PHPPresentation](https://github.com/PHPOffice/PHPPresentation/actions/workflows/php.yml/badge.svg?branch=master)](https://github.com/PHPOffice/PHPPresentation/actions/workflows/php.yml) [![Documentation Status](https://camo.githubusercontent.com/2e36d1ef626809d2aad1a263fa1f1bfb55c93f150e0f50b7a2ce6d6af6a7c9f9/68747470733a2f2f72656164746865646f63732e6f72672f70726f6a656374732f70687070726573656e746174696f6e2f62616467652f3f76657273696f6e3d6d6173746572)](http://phppresentation.readthedocs.io/en/latest/?badge=master)

Branch Develop : [![PHPPresentation](https://github.com/PHPOffice/PHPPresentation/actions/workflows/php.yml/badge.svg?branch=develop)](https://github.com/PHPOffice/PHPPresentation/actions/workflows/php.yml) [![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://github.com/PHPOffice/PHPPresentation/actions/workflows/php.yml) and [unit testing](https://coveralls.io/github/PHPOffice/PHPPresentation). 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 7.1+
- [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 Extension](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

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

2

Last Release

1787d ago

### Community

Maintainers

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

---

Top Contributors

[![gaogan779322720](https://avatars.githubusercontent.com/u/25579125?v=4)](https://github.com/gaogan779322720 "gaogan779322720 (4 commits)")

---

Tags

phppptxPowerPointpptodppresentationsLibreOffice

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/gogo-phppresentation/health.svg)

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

###  Alternatives

[phpoffice/phppresentation

PHPPresentation - Read, Create and Write Presentations documents in PHP

1.4k2.4M25](/packages/phpoffice-phppresentation)[blueimp/jquery-file-upload

File Upload widget for jQuery.

141.5M18](/packages/blueimp-jquery-file-upload)

PHPackages © 2026

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