PHPackages                             cleverape/phppowerpoint - 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. cleverape/phppowerpoint

ActiveLibrary

cleverape/phppowerpoint
=======================

PHPPowerPoint - Read, Create and Write Presentations documents in PHP

0.2.0(11y ago)2453LGPLPHPPHP &gt;=5.3.0

Since Jul 22Pushed 10y ago2 watchersCompare

[ Source](https://github.com/CleverApe/PHPPowerPoint)[ Packagist](https://packagist.org/packages/cleverape/phppowerpoint)[ Docs](http://phpoffice.github.io)[ RSS](/packages/cleverape-phppowerpoint/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (6)Versions (3)Used By (0)

[![PHPPowerPoint](https://github.com/PHPOffice/PHPPowerPoint/raw/master/docs/images/PHPPowerPointLogo.png "PHPPowerPoint")](https://github.com/PHPOffice/PHPPowerPoint/raw/master/docs/images/PHPPowerPointLogo.png)
====================================================================================================================================================================================================================

[](#)

[![Latest Stable Version](https://camo.githubusercontent.com/e962a2e9a8894b944020c18c933b3496602abbf71b47ae1578e42e8bf72955b6/68747470733a2f2f706f7365722e707567782e6f72672f7068706f66666963652f706870706f776572706f696e742f762f737461626c652e706e67)](https://packagist.org/packages/phpoffice/phppowerpoint)[![Build Status](https://camo.githubusercontent.com/7aecb74239a7c42faba8e1f709bd8d8757281532b6dc60328ad2f0d21fc8cc4e/68747470733a2f2f7472617669732d63692e6f72672f5048504f66666963652f504850506f776572506f696e742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/PHPOffice/PHPPowerPoint)[![Code Quality](https://camo.githubusercontent.com/89176ade232f2f32ae78a7ae2434cd82cb1e57974af406f66ca27eb86d38c02e/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f5048504f66666963652f504850506f776572506f696e742f6261646765732f7175616c6974792d73636f72652e706e673f733d62353939376365353961633238313662343531346633613338646539393030663664343932633164)](https://scrutinizer-ci.com/g/PHPOffice/PHPPowerPoint/)[![Code Coverage](https://camo.githubusercontent.com/510d3b212090579c3ee573e7d652204252a1faca2ad488f760fa2cbb06737d06/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f5048504f66666963652f504850506f776572506f696e742f6261646765732f636f7665726167652e706e673f733d37343261393837343537323563353632393535343430656463386432633339643766663561653235)](https://scrutinizer-ci.com/g/PHPOffice/PHPPowerPoint/)[![Total Downloads](https://camo.githubusercontent.com/a8ff9df64bd789a1c6018c6e56aaa79b6f92fd2b1104363620258bab58cbab39/68747470733a2f2f706f7365722e707567782e6f72672f7068706f66666963652f706870706f776572706f696e742f646f776e6c6f6164732e706e67)](https://packagist.org/packages/phpoffice/phppowerpoint)[![License](https://camo.githubusercontent.com/b5557f6a35d3c2a73d131f7c4b195be0ce552d996f338e570402dfd5f73931e3/68747470733a2f2f706f7365722e707567782e6f72672f7068706f66666963652f706870706f776572706f696e742f6c6963656e73652e706e67)](https://packagist.org/packages/phpoffice/phppowerpoint)

PHPPowerPoint 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).

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

Read more about PHPPowerPoint:

- [Features](#features)
- [Requirements](#requirements)
- [Installation](#installation)
- [Getting started](#getting-started)
- [Known issues](#known-issues)
- [Contributing](#contributing)
- [Developers' Documentation](http://phppowerpoint.readthedocs.org/)
- [API Documentation](http://phpoffice.github.io/PHPPowerPoint/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)
- Output to different file formats: PowerPoint 2007 (.pptx), OpenDocument Presentation (.odp), Serialized Presentation)
- ... and lots of other things!

### Requirements

[](#requirements)

PHPPowerPoint 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)

### Installation

[](#installation)

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

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

Alternatively, you can download the latest release from the [releases page](https://github.com/PHPOffice/PHPPowerPoint/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/PhpPowerpoint/src/PhpPowerpoint/Autoloader.php';
\PhpOffice\PhpPowerpoint\Autoloader::register();
```

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

[](#getting-started)

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

```
require_once 'src/PhpPowerpoint/Autoloader.php';
\PhpOffice\PhpPowerpoint\Autoloader::register();

$objPHPPowerPoint = new PhpPowerpoint();

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

// Create a shape (drawing)
$shape = $currentSlide->createDrawingShape();
$shape->setName('PHPPowerPoint logo')
      ->setDescription('PHPPowerPoint 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 PHPPowerPoint!');
$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://phppowerpoint.readthedocs.org/) and the [API Documentation](http://phpoffice.github.io/PHPPowerPoint/docs/master/) for more detail.

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

[](#contributing)

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

- Read [our contributing guide](https://github.com/PHPOffice/PHPPowerPoint/blob/master/CONTRIBUTING.md)
- [Fork us](https://github.com/PHPOffice/PHPPowerPoint/fork) and [request a pull](https://github.com/PHPOffice/PHPPowerPoint/pulls) to the [develop](https://github.com/PHPOffice/PHPPowerPoint/tree/develop) branch
- Submit [bug reports or feature requests](https://github.com/PHPOffice/PHPPowerPoint/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

Popularity15

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 68.4% 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

Unknown

Total

1

Last Release

4310d ago

### Community

Maintainers

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

---

Top Contributors

[![Progi1984](https://avatars.githubusercontent.com/u/1533248?v=4)](https://github.com/Progi1984 "Progi1984 (167 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)")[![bjo3rnf](https://avatars.githubusercontent.com/u/1183009?v=4)](https://github.com/bjo3rnf "bjo3rnf (5 commits)")[![Faab](https://avatars.githubusercontent.com/u/721256?v=4)](https://github.com/Faab "Faab (4 commits)")[![delphiki](https://avatars.githubusercontent.com/u/303778?v=4)](https://github.com/delphiki "delphiki (4 commits)")[![Djuki](https://avatars.githubusercontent.com/u/416411?v=4)](https://github.com/Djuki "Djuki (2 commits)")[![kaiesh](https://avatars.githubusercontent.com/u/1610089?v=4)](https://github.com/kaiesh "kaiesh (1 commits)")

---

Tags

phppptxPowerPointpptodppresentationsLibreOffice

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/cleverape-phppowerpoint/health.svg)

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

###  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)[tinybutstrong/opentbs

With OpenTBS you can merge LibreOffice, OpenOffice and Ms Office documents with PHP using the TinyButStrong template engine. Simple use LibreOffice, OpenOffice or Ms Office to edit your templates : DOCX, XLSX, PPTX, ODT, OSD, ODP and other formats.

82751.1k1](/packages/tinybutstrong-opentbs)

PHPackages © 2026

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