Skip to content

Missing chartXX.xml files in generated PPTX #841

Open
@dsferruzza

Description

@dsferruzza

Hi!

When building a presentation that contains many charts, sometimes the generated PPTX file does not open in PowerPoint (version 2411 from Office 365).
PowerPoint asks to repair the document, but fails to do so.
Opening the same file with LibreOffice Impress (24.8.4.2) works, but at least one chart is missing (it is listed under the slide in the object navigator, but appears completely blank).

I could not find a minimal way to reproduce this issue yet, but this is definitely related to dynamic data because most of the time the same code works well and generates a valid PPTX file.
While investigating, I discovered that, when opening the PPTX as a ZIP file, a least one ppt/charts/chartXX.xml file is missing; for example, both ppt/charts/chart12.xml and ppt/charts/chart14.xml are there, but no ppt/charts/chart13.xml.
If I put a ppt/charts/chart13.xml file in the ZIP (for example by duplicating another XML chart file), it works well: PowerPoint stops complaining and both PowerPoint and LibreOffice display the presentation correctly (except that the missing chart is now a duplicate of another chart, of course).

I tried to dig deeper, but I am not familiar enough with this lib's internals so I figured it could be a good idea to ask for help/pointers.
At some point I had the intuition the issue might be caused by the way charts are gathered in a hash table (maybe multiple charts are identical or similar from the hash's perspective and this results by only generating one of these chart files), but I am not sure...

Do you have any idea on how to solve or investigate further this issue?


I am using the latest commit from master (6e9da89 at the moment of writing) and PHP 8.3.
This may be the same issue as #695 but I am not sure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions