Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 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
  • Dec 07 2021 08:32

    Progi1984 on develop

    Feat: adds crosses/ crossesAt o… Feat: adds reversed order to ax… Docs: updates changelog and 5 more (compare)

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/ ?
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