Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 23 15:49
    potofcoffee commented #681
  • Jan 19 10:52
    entapris commented #670
  • Jan 10 13:56
    entapris opened #695
  • Jan 07 11:35
    andy-evergreen opened #694
  • Jan 02 15:39
    Youssef-KechEima opened #693
  • Dec 14 2021 10:24
    DennisBirkholz synchronize #692
  • Dec 13 2021 11:01
    DennisBirkholz synchronize #690
  • Dec 08 2021 18:10
    auto-assign[bot] assigned #692
  • Dec 08 2021 18:10
    auto-assign[bot] review_requested #692
  • Dec 08 2021 18:10
    DennisBirkholz opened #692
  • Dec 08 2021 18:07
    DennisBirkholz opened #691
  • Dec 08 2021 17:11
    DennisBirkholz edited #690
  • Dec 08 2021 17:11
    auto-assign[bot] assigned #690
  • Dec 08 2021 17:11
    auto-assign[bot] review_requested #690
  • Dec 08 2021 17:11
    DennisBirkholz opened #690
  • Dec 07 2021 11:13
    Progi1984 commented #671
  • Dec 07 2021 08:38

    github-actions[bot] on gh-pages

    deploy: f5907e199c6b4e52e574a9f… (compare)

  • Dec 07 2021 08:33
    Progi1984 closed #676
  • Dec 07 2021 08:32
    Progi1984 commented #676
  • Dec 07 2021 08:32
    Progi1984 demilestoned #676
Progi1984
@Progi1984
This midday, I work on #107 for @jrking4
Progi1984
@Progi1984
In next version, I will work on implementing PSR-3 logger in PhpPowerpoint... if you have some informations / links/references, thanks in advance
Progi1984
@Progi1984
Progi1984
@Progi1984
PHPPowerPoint will become PHPPresentation in version 0.5.0 (#114)...
Next two big steps before release : add reader for PPTX and ODP :) (#113 & #44)
Progi1984
@Progi1984
But before we implement a logger with the PSR-3 (#111)
Progi1984
@Progi1984
WIP : Reader for PowerPoint 2007 (#44 @arbabi2010)
Done : Document Properties
Done : Reading Images
Progi1984
@Progi1984
Done : Tests complete
Progi1984
@Progi1984
Done : Tests validated with the import
Remaining : Sample with the Tree
Progi1984
@Progi1984
OK for PowerPoint 2007 Reader #44
WIP : Reader for ODPresentation #113
Progi1984
@Progi1984
ODPresentation reader pushed to develop branch.
JewrassicPark
@JewrassicPark
I may have use of a simple appear animation for my job, I was going to try and implement it but it might not be generalized enough to commit properly (it would only be simple appear onclick) I checked out some of the source for a ppt with that animation and it's pretty simple, just an extra structure at the end of each slide1.xml, slide2.xml etc
Progi1984
@Progi1984
@JewrassicPark Do you talk about transitions ? I added it in 0.4 : https://github.com/PHPOffice/PHPPowerPoint/blob/master/samples/Sample_10_Transition.php
JewrassicPark
@JewrassicPark
I think that's slide transitions right? Like from slide 1 to slide 2?
I'm talking about shape animations
Progi1984
@Progi1984
affirmative
JewrassicPark
@JewrassicPark
so on slide 1, click and some text appears, click again and some other text appears etc
is what I'm trying to do
Progi1984
@Progi1984
oki.... Else create an issue, I would work on it in 0.6.0 of PhpPresentation :)
JewrassicPark
@JewrassicPark
Is there a way to uniquely identify shapes on a slide. Each animation can have n shapes associated with it (you click once and two shapes appear for example). But shapes in the writer are given an id in their order of collection. The animation objects might not contain every shape so I need that id to map. I can iterate through the shapescollection in the animation but i need to know which shape it is in the entire slide shape collection. Can I use the Hash Index for this or is that for something else entirely?
...getHashCode looks more like what i want
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/ ?