jgm / pandoc

Universal markup converter
https://pandoc.org
Other
33.95k stars 3.35k forks source link

pptx corrupt when using with pandoc template.pptx just opened and saved with LibreOffice or PowerPoint #10085

Open MichaelNI2024 opened 1 month ago

MichaelNI2024 commented 1 month ago

I use quarto.org which relies on pandoc to produce pptx documents. When using the default template (created with "quarto pandoc -o template.pptx --print-default-data-file reference.pptx") I can produce a valid ppt-file. When I open the template and save it without any change under a new name (either from LibreOffice on Mac (example attached) or Libreoffice on Windows or Powerpoint on Windows) and use this "new" template, the output is corrupt. Powerpoint on Windows 11 can't open it, Powerpoint on Win 10 partially repairs it, part are missing and Libreoffice on Win 10 opens it but, things are missing.

The issue might be related to the open issue #9421 but I could not reproduce the Teams issue, i.e. I could copy the original template on a network drive and it still worked.

Attached you also find both pptx-results.

template.pptx templateLOmac.pptx

TestPowerpoint-working-produced-with-template .pptx TestPowerpoint-corrupted-produced-with-templateLOmac.pptx

The pandoc version coming with Quarto 1.4 is 3.1.11.

MichaelNI2024 commented 1 month ago

The same happens also when I replace the version 3.1.11 with the newest version 3.3

jgm commented 4 weeks ago

When I try to save the template.pptx using LibreOffice I get this dialog box. How did you respond?

image
jgm commented 4 weeks ago

I selected "Use PowerPoint 2007-365 format." I was then able to open the saved file with both Powerpoint and LibreOffice...

MichaelNI2024 commented 4 weeks ago

That is not the issue. The "saved" template can be reopened with any ppt-programm. The issue is that a pptx produced with pandoc based on this "saved" template is corrupted, i.e. TestPowerpoint-corrupted-produced-with-templateLOmac.pptx