## Where communities thrive

• Join over 1.5M+ people
• Join over 100K+ communities
• Free without limits
##### 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

• Nov 25 19:08

Progi1984 on develop

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

@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
@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

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();

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/ ?
Thomas Citharel
@tcitworld
PhpPptTree should be imported.
Probably something like
use PhpOffice\PhpPresentation\PhpPptTree
Check the correct path inside the sources

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
Thomas Citharel
@tcitworld
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.
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.
Ah, good to know
Thomas Citharel
@tcitworld
That's why in the sample there's this header file that's used in all samples.
Is it possible to actually show the presentation itself?
Thomas Citharel
@tcitworld
Well, if you have exactly the same thing as the sample, yes.
It just shows a tree structure
Thomas Citharel
@tcitworld
Maybe there's a better sample, but you have to work everything else, yeah
My goal is to actually play a powerpoint presentation, this is possible right?
Thomas Citharel
@tcitworld
no
not that i know of
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
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.
If you want animations in the browser and all that sort of stuff, checkout impress.js, but it's only html
Ah, thanks for your time then but this isn't what I'm looking for.
Thanks for the info, I'll take a look, have a nice day
Progi1984
@Progi1984
@tcitworld Thanks for the support :)
Thomas Citharel
@tcitworld
o/
Julio Henrique
@juliohds
any know about bug in images with slide master?
@PowerKiKi
@Progi1984, PhpPresentation first release is about 4 years old (and last release ~6 months old), shouldn't we release a 1.0.0 soonish to show that the project is mature and has been production ready for a while ?
slolo2000
@slolo2000

Hello, when trying to load pptx file I have the following error:
Warning: imagecreatefromstring(): Data is not in a recognized format in D:\Test\vendor\phpoffice\phppresentation\src\PhpPresentation\Reader\PowerPoint2007.php on line 731
Warning: imagesx() expects parameter 1 to be resource, boolean given in D:\Test\vendor\phpoffice\phppresentation\src\PhpPresentation\Shape\Drawing\Gd.php on line 78
Warning: imagesy() expects parameter 1 to be resource, boolean given in D:\Test\vendor\phpoffice\phppresentation\src\PhpPresentation\Shape\Drawing\Gd.php on line 79

In fact, in the pptx file there is an "image". I suspect that this image was paste from a Word document because when I save it from pptx file, PowerPoint save it as .emf file
So, is PhpPresentation really support this type of object?

Otherwise, do I have to load document like this (with @ in order to skip warning):
$docPpt = @PhpPresentation\IOFactory::load($inputFileName);

Thanks in advance and have a nice day.

mhasanshahid
@mhasanshahid
I have a question related to scatter plot. It takes a series with an array. Inside that array we have key => value pairs. I suppose X as a key and Y as a value and it creates my scatter chart with X Y value. But the problem is that my X values can repeat, but as a key of an array it should always be unqiue
how can i resolve this?
@Progi1984
mhasanshahid
@mhasanshahid
PHPPresentation uses PHPExcel for writer of pptcharts, but at the same time the library phpexcel itself says its depricated and should not be used, and spreadsheet should be used. @Progi1984
Progi1984
@Progi1984
@juliohds Could you open an issue, please ?
@PowerKiKi I have some fu**ing problems with validation before that, but it's in my pipe ;)