Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Nov 29 09:44
    mindline-analytics commented #676
  • Nov 27 22:13
    mindline-analytics synchronize #676
  • Nov 27 21:59
    mindline-analytics synchronize #676
  • Nov 26 08:45
    Progi1984 milestoned #671
  • Nov 26 08:43
    Progi1984 milestoned #676
  • Nov 25 20:27

    github-actions[bot] on gh-pages

    deploy: 47046dd5c9b628beee3ea98… (compare)

  • Nov 25 20:23
    Progi1984 assigned #541
  • Nov 25 20:23
    Progi1984 commented #541
  • Nov 25 20:22
    Progi1984 milestoned #541
  • Nov 25 20:22

    Progi1984 on develop

    Hyperlink color fix for PowerPo… Fixed PHP MD Errors Added Unit Tests and 4 more (compare)

  • Nov 25 20:22
    Progi1984 closed #682
  • Nov 25 20:22
    Progi1984 closed #541
  • Nov 25 20:14
    Progi1984 synchronize #682
  • Nov 25 20:12
    Progi1984 commented #682
  • Nov 25 20:12
    Progi1984 synchronize #682
  • Nov 25 20:10
    Progi1984 milestoned #682
  • Nov 25 20:10
    Progi1984 commented #682
  • Nov 25 19:13

    github-actions[bot] on gh-pages

    deploy: c34154c5b97166c56d519b2… (compare)

  • Nov 25 19:08

    Progi1984 on composer

    (compare)

  • Nov 25 19:08

    Progi1984 on develop

    Update phpstan/phpstan requirem… Fixed PHPStan errors Merge pull request #683 from PH… (compare)

JewrassicPark
@JewrassicPark
I took a swing at getting animations to work http://www.filedropper.com/phppowerpoint-editing-7-29-2015
It only does simple appear onclick
Added /src/PhpPresentation/Slide/Animation.php , made a few changes to /src/PhpPresentation/Slide.php and the Slide writer for PP2007
This is basically how I'm using it
    public function addAnimation($shapes = ARRAY()){
        $animation = new Animation();
        $currentSlide = $this->pp->getActiveSlide();
        $currentSlide->addAnimation($animation);         

        foreach($shapes as $s){
            $animation->addShape($s);
        }

        return $animation;

    }
Each slide has N animations, each animation has M shapes
The function above is just part of my wrapper class for phppowerpoint
The only logic I really had to change in the slide writer is that the shape ids have to start at 2 instead of 1, 1 seems to correspond to the slide itself not any shapes so the animation wasn't working correctly. Tested in Powerpoint 2013
Progi1984
@Progi1984

@JewrassicPark The unique identifier can be the hashcode : getHashCode.

If you want to share your code, add a pull request : I will have no problem for reviewing it and merging it into the project (after docs & unit tests but I help for these parts).

Szymon Krajewski
@skrajewski
@Progi1984, thank you for review #180 - Could you help me with the unit tests to this functionality? Currently. I have no idea how I should begin :/
Progi1984
@Progi1984
@skrajewski I just answered on your commit.
skrajewski/PHPPresentation@11593cf
Shiz
@Shizmob
Hey, is there a way to deduplicate media assets? I currently reuse drawings with the same resource path (but potentially different X/Y/W/H) in different slides a lot, and it really bloats the presentation size.
Vache Ghadimian
@VickG
what is PHPPresentation? I am wondering if I can take an already made excel sheet and display it in my web browser
Progi1984
@Progi1984
No you should use Phpexcel
Vache Ghadimian
@VickG
@Progi1984 I tried PHPExcels HTML output...it only outputs the first worksheet. I don't understnad what PHPPresentation does.
Progi1984
@Progi1984
Phppresentation works with powerpoint.
Mark Baker
@MarkBaker
PHPExcel only displays one worksheet with the HTML Writer /by default/. You can explicitly tell it to generate HTML output for all worksheets, or for specific named worksheets. Just check the public methods in the HTML Writer class.
Justijn Depover
@justijndepover
Hi, I'm trying to merge multiple pptx files together with PHPPresentation. So far I've managed to read a pptx file and write that same file to a different folder. However, if I open the newly generated file, It looks like a lot of data has lost. Either text has disappeared or background images are gone.
I've included the libraries correctly and did the following
This message was deleted
$pptReader = IOFactory::createReader('PowerPoint2007');
        $oPHPPresentation = $pptReader->load(SECURE_PATH . '/documents/powerpoint/SamplePPTX.pptx');

        $pptWriter = IOFactory::createWriter($oPHPPresentation, 'PowerPoint2007');
        $pptWriter->save(__DIR__ . '/sample.pptx');
Progi1984
@Progi1984
ThaDaVos
@ThaDaVos

Hey, when trying to run the following code:

require_once 'vendor/autoload.php';

use PhpOffice\PhpPresentation\IOFactory;
use PhpOffice\PhpPresentation\Slide;
use PhpOffice\PhpPresentation\Shape\RichText;

$pptReader = IOFactory::createReader('PowerPoint2007');
$oPHPPresentation = $pptReader->load('resources/Digital Signage.pptx');

$oTree = new PhpPptTree($oPHPPresentation);
echo $oTree->display();

I get an error about:

Fatal error: Uncaught Error: Class 'PhpPptTree' not found in \index.php:18 Stack trace: #0 {main} thrown in \index.php on line 18

Thomas Citharel
@tcitworld
Is there anything inside vendor/ ?
ThaDaVos
@ThaDaVos
Yes there is, I installed everything using Composer like said on this page: http://phppresentation.readthedocs.io/en/latest/installing.html#using-composer
Thomas Citharel
@tcitworld
PhpPptTree should be imported.
Probably something like
use PhpOffice\PhpPresentation\PhpPptTree
Check the correct path inside the sources
ThaDaVos
@ThaDaVos

code is now:

require_once 'vendor/autoload.php';

use PhpOffice\PhpPresentation\IOFactory;
use PhpOffice\PhpPresentation\Slide;
use PhpOffice\PhpPresentation\Shape\RichText;
use PhpOffice\PhpPresentation\PhpPptTree;

$pptReader = IOFactory::createReader('PowerPoint2007');
$oPHPPresentation = $pptReader->load('resources/Digital Signage.pptx');

$oTree = new PhpPptTree($oPHPPresentation);
echo $oTree->display();

Still getting error:

Fatal error: Uncaught Error: Class 'PhpOffice\PhpPresentation\PhpPptTree' not found in D:\Projects\PHPStorm\VosSignage\index.php:19 Stack trace: #0 {main} thrown in D:\Projects\PHPStorm\VosSignage\index.php on line 19

I'm using PHPStorm, that shouldn't be a problem, right?
For testing, it runs in AMPPS
ThaDaVos
@ThaDaVos
I haven't included the sample_header because I thought it is just a simple header file
Thomas Citharel
@tcitworld
Well, it's the one that does all the display stuff.
ThaDaVos
@ThaDaVos
I'll try creating a header file
Thomas Citharel
@tcitworld
PHPPresentation is just a object representing the presentation data, it doesn't have any methods or so to render itself.
ThaDaVos
@ThaDaVos
Ah, good to know
Thomas Citharel
@tcitworld
That's why in the sample there's this header file that's used in all samples.
ThaDaVos
@ThaDaVos
Is it possible to actually show the presentation itself?
Thomas Citharel
@tcitworld
Well, if you have exactly the same thing as the sample, yes.
ThaDaVos
@ThaDaVos
It just shows a tree structure
Thomas Citharel
@tcitworld
Maybe there's a better sample, but you have to work everything else, yeah
ThaDaVos
@ThaDaVos
My goal is to actually play a powerpoint presentation, this is possible right?
Thomas Citharel
@tcitworld
no
not that i know of
ThaDaVos
@ThaDaVos
Oh I thought that PHPOfficePHPPresentation was made for that
My mistake
Thomas Citharel
@tcitworld
PHPOffice is a toolbox / library to work with files, not a ready-to-use app
ThaDaVos
@ThaDaVos
I know, but I thought it was capable of playing a powerpoint presentation with animations in the browser
Thomas Citharel
@tcitworld
Nah. I wanted to work on that to import .ppt into Framaslides, but never got the time.