PHPackages                             alejandrososa/yii-power-point - 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. alejandrososa/yii-power-point

ActiveYii-component[PDF &amp; Document Generation](/categories/documents)

alejandrososa/yii-power-point
=============================

Yii PowerPoint - Create and write presentations, with slides; slides are made up of text, images in PHP

21501[1 issues](https://github.com/alejandrososa/Yii-PowerPoint-Component/issues)PHP

Since Dec 1Pushed 6y ago1 watchersCompare

[ Source](https://github.com/alejandrososa/Yii-PowerPoint-Component)[ Packagist](https://packagist.org/packages/alejandrososa/yii-power-point)[ RSS](/packages/alejandrososa-yii-power-point/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Yii PowerPoint Component
========================

[](#yii-powerpoint-component)

Yii PowerPoint - Create and write presentations, with slides; slides are made up of text, images in PHP

QUICK START
-----------

[](#quick-start)

You can see all examples and documentation:

```
  yiiAppPath/protected/vendor/alejandrososa/yii-power-point/samples
  yiiAppPath/protected/vendor/alejandrososa/yii-power-point/README.md

```

INSTALLATION
------------

[](#installation)

On command line, type in the following commands:

```
    $ cd yiiAppPath/protected
    $ composer init && composer install                    (optional if not have composer.json)
    $ composer require alejandrososa/yii-power-point dev-master

```

Assuming that the vendor is installed in yiiAppPath/index.php

```
    // Include the vendor's autoloader:
    $vendor = dirname(__FILE__) . '/protected/vendor/autoload.php';
    require_once($vendor);

```

Now we import the vendor installed in the library main.php Edit the protected/config/main.php adding the following:

```
    //(optional path alias for images)
    Yii::setPathOfAlias('images', dirname(dirname(dirname(__FILE__))).'/images');

    return array(
        // autoloading model and component classes
        'import' => array(
            'application.vendor.*',
            ...
        )
        // application components
        'components'=>array(
            'ppt' => array(
                'class' => 'AlejandroSosa\\YiiPowerPoint\\PowerPoint'
            )
            ...
        )
    ),

```

USAGE
-----

[](#usage)

The first step in our controller is import Power Point class

```
    // in your Controller
    (use optional, only to call constants defined in PowerPoint)
    use AlejandroSosa\YiiPowerPoint\PowerPoint;

    class SiteController extends Controller {
        ...
    }

```

Now in your action

```
    /**
    * Create PPT
    */
    public function actionCreatePPT()
    {
        $options = [
            'fileName' => 'myFirstPPT',
            'fileProperties' => [
                'creator' => Yii::t('app', 'MyCompany'),
                'title' => Yii::t('app', 'State Budget 2016'),
                'subject' => Yii::t('app', 'Resumen General'),
                'description' => Yii::t('app', 'Any description')
            ],
            'layout' => [
                'background' => Yii::getPathOfAlias('images') .'/ppt/bg.png'
            ]
        ];

        $slides = [
            [
                'texts' => [
                    [
                        'text'=>Yii::t('app', 'Delivery'),
                        'options'=>[
                            'height'=>143, 'width'=>793, 'ox'=>120, 'oy'=>180,
                            'bold'=> true, 'size'=>44, 'color'=>PowerPoint::COLOR_CYAN,
                            'align'=>PowerPoint::TEXT_ALIGN_HORIZONTAL_CENTER,
                        ],
                    ],
                    [
                        'text'=>Yii::t('app', 'State Budget 2016'),
                        'options'=>[
                            'height'=>143, 'width'=>793, 'ox'=>170, 'oy'=>240,
                            'bold'=> false, 'size'=>40, 'color'=>PowerPoint::COLOR_BLUE,
                            'align'=>PowerPoint::TEXT_ALIGN_HORIZONTAL_CENTER,
                        ],
                    ]
                ]
            ]
        ];

        Yii::app()->ppt->generate($options, $slides);
    }

```

SETTINGS OF CHARTS
------------------

[](#settings-of-charts)

**General Purpose in options**

PropertyDefinitionTypeheightheight of the graph in pixelsintegerwidthwidth of the graph in pixelsintegeroxX coordinate, horizontal position on the slideintegeroyY coordinate, vertical position on the slideinteger**IMAGES**

PropertyDefinitionType**options**Includes the following propertiesarraypathAbsolute path of the imagestringnameName of the image (optional)stringdecriptionDescription of the image (optional)string**TEXTS**

PropertyDefinitionType**text**Text you want to insertstring**options**Includes the following propertiesarrayalignText alignmentstring, you can access the constants from PowerPoint::TEXT\_ALIGN\_HORIZONTAL\_CENTERboldBold textboolean, default is falsecolorText colorstring, default is COLOR\_PRIMARY\_TEXT. You can access the constants from PowerPoint::COLOR\_BLUEsizeText size, default is 14integer**TABLES**

PropertyDefinitionTypeheightHeight of the table in pixelsintegerwidthWidth of the table in pixelsintegeroxX coordinate, horizontal position on the slideintegeroyY coordinate, vertical position on the slideinteger**header**Row that represents the header of the table, array with the columns it containsarraycolumnsArray of columns, contains text and column stylearraytextText you want to insert into columnstring**style**Includes the following properties into column,arraybackgroundBackground color of columnstring, default is COLOR\_WHITE. You can access the constants from PowerPoint::COLOR\_WHITEheightHeight of column in pixelsinteger, default is 20widthWidth of colum in pixelsinteger, default is 100alignText alignment of columnstring default is center, you can access the constants from PowerPoint::TEXT\_ALIGN\_HORIZONTAL\_CENTERboldBold text of columnboolean, default is falsecolorText color of columnstring, default is COLOR\_PRIMARY\_TEXT. You can access the constants from PowerPoint::COLOR\_BLUEsizeText size of column, default is 14integerborderWidthBorder width of column, default is 1integerborderColorBorder color of column, default is COLOR\_GREY. You can access the constants from PowerPoint::COLOR\_WHITEstring**rows**Row that represents the header of the table, array with the columns it containsarraycolumnsArray of columns, contains text and column style or only textarray or string**style**Like the header, you can use the style properties in the rows at the general level for all rowsarray**Nota**: Styles can be applied at the general level for all rows or at a specific level for a column, you can see sample\_tables

**CHARTS**

PropertyDefinitionType**title**Title of chartstring**series**Array of data series composed of key and value array('2015'=&gt;150)array(string=&gt;integer)**seriesTrends**Array of data series trends composed of key and value array('2015'=&gt;150)array(string=&gt;integer)**options**Includes the following propertiesarraytypeType of chart to createstring, you can access the constants from PowerPoint::TEXT\_ALIGN\_HORIZONTAL\_CENTERseriesNameNames of the data series, the name quantity must be equal to the number of data seriesarraytrendsNameNames of the data series trends, the name quantity must be equal to the number of data seriesarrayshowSeriesNameVisibility of data series names, default is truearrayshowTrendsNameVisibility of data series trends names, default is truearrayshowPercenteDisplays the percentages of the data series, default is truebooleanshowValueDisplays the values of the data series, default is truebooleanshowSymbolShow symbol in data series, default is true. Only in ScatterbooleantypeSymbolShow symbol in data series, default is true. Only in ScatterbooleantitleItalicTitle in italic format, default is false.booleanlegendItalicTitle of legend in italic format, default is false.booleanlegendBackgroundBackground color of legendstring, default is none. You can access the constants from PowerPoint::COLOR\_WHITElegendVisibleShow legend of data series, default is true.booleanlegendOxX coordinate of legend, horizontal position on the chartintegerlegendOyY coordinate of legend, vertical position on the chartintegerAvailable the following type charts: CHART\_TYPE\_BAR, CHART\_TYPE\_BAR\_HORIZONTAL, CHART\_TYPE\_BAR\_STACKED, CHART\_TYPE\_BAR\_PERCENT\_STACKED, CHART\_TYPE\_BAR\_3D, CHART\_TYPE\_BAR\_TRENDLINE, CHART\_TYPE\_PIE, CHART\_TYPE\_PIE\_3D, CHART\_TYPE\_SCATTER.

Available the following symbols in scatter: SYMBOL\_CIRCLE, SYMBOL\_DASH, SYMBOL\_DIAMOND, SYMBOL\_DOT, SYMBOL\_NONE, SYMBOL\_PLUS, SYMBOL\_SQUARE, SYMBOL\_STAR, SYMBOL\_TRIANGLE, SYMBOL\_X.

OTHER EXAMPLES
--------------

[](#other-examples)

The other examples to create tables and graphs can be found in vendor/alejandrososa/yii-power-point/samples

WHAT'S NEXT
-----------

[](#whats-next)

If you notice a bug, think about some improvement, then please write me

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 Bus Factor1

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

### Community

Maintainers

![](https://www.gravatar.com/avatar/151cf3ca8142a7a7a5abecc247554f930db42caf28199a5e4483115b92a65af0?d=identicon)[alesjohnson](/maintainers/alesjohnson)

---

Top Contributors

[![alejandrososa](https://avatars.githubusercontent.com/u/13384058?v=4)](https://github.com/alejandrososa "alejandrososa (72 commits)")[![gnovaro](https://avatars.githubusercontent.com/u/270990?v=4)](https://github.com/gnovaro "gnovaro (4 commits)")

### Embed Badge

![Health badge](/badges/alejandrososa-yii-power-point/health.svg)

```
[![Health](https://phpackages.com/badges/alejandrososa-yii-power-point/health.svg)](https://phpackages.com/packages/alejandrososa-yii-power-point)
```

###  Alternatives

[macopedia/magmi2

Magento Mass Importer 'Magmi' for Magento 2

11615.7k](/packages/macopedia-magmi2)[tarfin-labs/easy-pdf

Makes pdf processing easy.

1719.9k](/packages/tarfin-labs-easy-pdf)

PHPackages © 2026

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