Skip to content
New issue

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

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

Already on GitHub? # to your account

Reading and writing PPTX leads to "destroyed" layout #837

Open
deeskayp opened this issue Dec 20, 2024 · 1 comment
Open

Reading and writing PPTX leads to "destroyed" layout #837

deeskayp opened this issue Dec 20, 2024 · 1 comment

Comments

@deeskayp
Copy link

Hey folks. I'm trying to open a .pptx template file, add my data and write it back as .pptx. However, if I just open the file and write it back, the layout is somehow destroyed.

Here's my code:

$reader = IOFactory::createReader('PowerPoint2007');
$presentation = $reader->load('template.pptx');
$writer = IOFactory::createWriter($presentation, 'PowerPoint2007');
$writer->save('result.pptx');

This is how the template looks like:
template

and this is the result:
result

I attached my template file:
template.pptx

This issue might be related to #718

@xlar8or
Copy link

xlar8or commented Jan 3, 2025

I'm having exactly the same issue, overall, the saving process seems a bit broken. Displays vertical text instead of horizontal text, wrong font size, shapes aren't saved, image sizes aren't the same, audio/video isn't saved, etc. Unfortunantely this makes the library unusable if you are using slides from another pptx and you're not building the entire pptx from code.

image
image
image
image
image
image

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

No branches or pull requests

3 participants