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

Has anyone used addExternalSlide? #143

Closed
tsanami69 opened this issue Nov 6, 2015 · 2 comments
Closed

Has anyone used addExternalSlide? #143

tsanami69 opened this issue Nov 6, 2015 · 2 comments
Assignees
Milestone

Comments

@tsanami69
Copy link

tsanami69 commented Nov 6, 2015

I have the latest build working fine on my server, but I cannot figure out how to use addExternalSlide to load slides from single-slide presentations I have in a library...Could anyone please give an example of code to use this?
Thanks

@eposjk
Copy link

eposjk commented Dec 10, 2015

function appendPresentation($pres, $format, $filename) {
    $reader = IOFactory::createReader($format);
    $pres2 = $reader->load($filename);
    $c = $pres2->getSlideCount();
    for($i=0; $i<$c; $i++)
        $pres->addExternalSlide($pres2->getSlide());
}

At least for now (2015) - don't expect it to copy slidemasters.
But it might work for very simple presentations.

@tsanami69
Copy link
Author

Thanks for the code!

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

No branches or pull requests

3 participants