PHPOffice / PHPPresentation

A pure PHP library for reading and writing presentations documents
https://phpoffice.github.io/PHPPresentation
Other
1.31k stars 521 forks source link

Broken layout when save PPTX #756

Open dewaruccii opened 1 year ago

dewaruccii commented 1 year ago

Screenshot 2023-09-12 at 14 14 56 Screenshot 2023-09-12 at 14 15 26

Error in write , please help

Progi1984 commented 2 months ago

@dewaruccii Informations are missing. Could you send me the code for the présentation ?

wilr commented 2 months ago

@Progi1984 I can replicate for sure the issue with loading + saving. I assume it's just something not handled by the library.

Here is a sample presentation which you can use as a sample test one.

Populated-Text-A4-Landscape.pptx

All I've got is a simple reader, then a writer

        $pptReader = IOFactory::createReader('PowerPoint2007');
        $oPHPPresentation = $pptReader->load('sample.pdf');

        $xmlWriter = IOFactory::createWriter($oPHPPresentation, 'PowerPoint2007');
        $xmlWriter->save('export.pptx');

Export looks something like below.

Screenshot 2024-08-26 at 1 12 50 PM

Progi1984 commented 2 months ago

Need #490