Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Defining the Slideposition where i add the Slides #12

Open
FabianMartin1988 opened this issue Sep 22, 2021 · 1 comment
Open

Defining the Slideposition where i add the Slides #12

FabianMartin1988 opened this issue Sep 22, 2021 · 1 comment

Comments

@FabianMartin1988
Copy link

FabianMartin1988 commented Sep 22, 2021

Hello,

first of all thank you guys for this Libary, it its pretty much what we need in our project right now. I started playing around a little bit an managed to insert only certain slides:

use Cristal\Presentation\PPTX;

require 'vendor/autoload.php';

$basePPTX = new PPTX("mappenlager\Präsentation1.pptx");
$endPPTX = new PPTX("mappenlager\Präsentation2.pptx");

//Get the slides as an Array of Slides
$SlideArray = array();
$SlideArray = $endPPTX->getSlides();

//This adds only the first slide of the end pptx
$basePPTX->addSlide($SlideArray[0]);
//This adds only the second slide of the end pptx
$basePPTX->addSlide($SlideArray[1]);

So far so good, it works fast and fine ! Now my question: is there a possibility to tell the script where to insert those slides? For Example: Slide 1 in the endPPtx should be on Position 3 in the basePptx ? How would i approach this ?

Thank you very much
Fabian

@FabianMartin1988
Copy link
Author

FabianMartin1988 commented Sep 22, 2021

I think i was too quick with my questions, because i just tested the functionallity with some pptx where i just wrote Presentation 1 Slide 1 in the headline, with this simple slides it worked fine....

Now i tried the same with some propper formatted Slides from our customer and it says that the merged presentation is corrup, when i repair it the whole layout of the new slides is pretty much messed up :(

image

image

Any hints on what i am missing out ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant