2017 © Pedro Peláez
 

library phppowerpoint

PHPPresentation - Read, Create and Write Presentations documents in PHP

image

phpoffice/phppowerpoint

PHPPresentation - Read, Create and Write Presentations documents in PHP

  • Sunday, December 31, 2017
  • by PHPOffice
  • Repository
  • 70 Watchers
  • 653 Stars
  • 37,422 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 256 Forks
  • 120 Open issues
  • 13 Versions
  • 1 % Grown

The README.md

PHPPresentation

Latest Stable Version Coverage Status Total Downloads License, (*1)

Branch Master : PHPPresentation, (*2)

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 (OOXML or OpenXML) or OASIS Open Document Format for Office Applications (OpenDocument or ODF)., (*3)

PHPPresentation is an open source project licensed under the terms of LGPL version 3. PHPPresentation is aimed to be a high quality software product by incorporating continuous integration and unit testing. You can learn more about PHPPresentation by reading the Developers' Documentation and the API Documentation., (*4)

Read more about PHPPresentation:, (*5)

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

PHPPresentation requires the following:, (*6)

Installation

Composer method

It is recommended that you install the PHPPresentation library through composer. To do so, add the following lines to your composer.json., (*7)

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

Manual download method

Alternatively, you can download the latest release from the releases page. In this case, you will have to register the autoloader. (Register autoloading is required only if you do not use composer in your project.), (*8)

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. And you will also have to register its autoloader, too., (*9)

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

Getting started

The following is a basic usage example of the PHPPresentation library., (*10)

// 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. You can also read the Developers' Documentation and the API Documentation for more detail., (*11)

Contributing

We welcome everyone to contribute to PHPPresentation. Below are some of the things that you can do to contribute:, (*12)

The Versions

31/12 2017

dev-develop

dev-develop http://phpoffice.github.io

PHPPresentation - Read, Create and Write Presentations documents in PHP

  Sources   Download

LGPL

The Requires

 

The Development Requires

php powerpoint pptx libreoffice ppt odp presentations

14/10 2017

dev-issue253pptx

dev-issue253pptx http://phpoffice.github.io

PHPPresentation - Read, Create and Write Presentations documents in PHP

  Sources   Download

LGPL

The Requires

 

The Development Requires

php powerpoint pptx libreoffice ppt odp presentations

14/10 2017

dev-issue313pptx

dev-issue313pptx http://phpoffice.github.io

PHPPresentation - Read, Create and Write Presentations documents in PHP

  Sources   Download

LGPL

The Requires

 

The Development Requires

php powerpoint pptx libreoffice ppt odp presentations

14/10 2017

dev-issue271pptx

dev-issue271pptx http://phpoffice.github.io

PHPPresentation - Read, Create and Write Presentations documents in PHP

  Sources   Download

LGPL

The Requires

 

The Development Requires

php powerpoint pptx libreoffice ppt odp presentations

13/10 2017

dev-issue279pptx

dev-issue279pptx http://phpoffice.github.io

PHPPresentation - Read, Create and Write Presentations documents in PHP

  Sources   Download

LGPL

The Requires

 

The Development Requires

php powerpoint pptx libreoffice ppt odp presentations

05/07 2017

dev-master

9999999-dev http://phpoffice.github.io

PHPPresentation - Read, Create and Write Presentations documents in PHP

  Sources   Download

LGPL

The Requires

 

The Development Requires

php powerpoint pptx libreoffice ppt odp presentations

05/07 2017

0.9.0

0.9.0.0 http://phpoffice.github.io

PHPPresentation - Read, Create and Write Presentations documents in PHP

  Sources   Download

LGPL

The Requires

 

The Development Requires

php powerpoint pptx libreoffice ppt odp presentations

03/04 2017

0.8.0

0.8.0.0 http://phpoffice.github.io

PHPPresentation - Read, Create and Write Presentations documents in PHP

  Sources   Download

LGPL

The Requires

 

The Development Requires

php powerpoint pptx libreoffice ppt odp presentations

12/09 2016

0.7.0

0.7.0.0 http://phpoffice.github.io

PHPPresentation - Read, Create and Write Presentations documents in PHP

  Sources   Download

LGPL

The Requires

 

The Development Requires

php powerpoint pptx libreoffice ppt odp presentations

24/01 2016

0.6.0

0.6.0.0 http://phpoffice.github.io

PHPPresentation - Read, Create and Write Presentations documents in PHP

  Sources   Download

LGPL

The Requires

 

The Development Requires

php powerpoint pptx libreoffice ppt odp presentations

08/10 2015

0.5.0

0.5.0.0 http://phpoffice.github.io

PHPPresentation - Read, Create and Write Presentations documents in PHP

  Sources   Download

LGPL

The Requires

 

The Development Requires

php powerpoint pptx libreoffice ppt odp presentations

07/07 2015

0.4.0

0.4.0.0 http://phpoffice.github.io

PHPPowerPoint - Read, Create and Write Presentations documents in PHP

  Sources   Download

LGPL

The Requires

 

The Development Requires

php powerpoint pptx libreoffice ppt odp presentations

22/07 2014

0.2.0

0.2.0.0 http://phpoffice.github.io

PHPPowerPoint - Read, Create and Write Presentations documents in PHP

  Sources   Download

LGPL

The Requires

  • php >=5.3.0
  • ext-xml *
  • ext-zip *

 

The Development Requires

php powerpoint pptx libreoffice ppt odp presentations