jgm / pandoc

Universal markup converter
https://pandoc.org
Other
34.82k stars 3.39k forks source link

[PPTX] Reference doc with no footer on one template slide cause invalid pptx rendered #9139

Open cderv opened 1 year ago

cderv commented 1 year ago

Take this markdown

---
title: Test
author: Max
date: 23/10/2023
---

# content

Convert to powerpoint

pandoc -f markdown -t pptx -o test.pptx test.md

Open the result file, and tweak it the following way for reference doc: We don't want footer on title slide. So untick footer on slide 2 from master view image

Save as template.pptx et use it as reference doc

pandoc -f markdown -t pptx -o test.pptx --reference-doc 'template.pptx' test.md

Now try to open test.pptx but you'll get an error to repair image

Remove the date field in YAML

---
title: Test
author: Max
---

# content

and re-render

pandoc -f markdown -t pptx -o test.pptx --reference-doc 'template.pptx' test.md

No more error.

So something is causing issue in openxml written probably for footers when using a reference doc with no footer on one type of slide.

jgm commented 1 year ago

Open the result file, and tweak it the following way for reference doc

Instead of doing this, please try what the documentation recommends. Get a copy of the default reference doc, open it in powerpoint, and make that one adjustment and save as your new reference doc. This may not make a difference but it would be good to know.

jgm commented 1 year ago

I'm not completely sure what changes we can handle in the reference.pptx. (Original author of this module isn't active now, and I don't know a lot about this format.) In the case of docx, we really only support changes in the styles as listed in the manual.

cderv commented 1 year ago

Instead of doing this, please try what the documentation recommends. Get a copy of the default reference doc, open it in powerpoint, and make that one adjustment and save as your new reference doc.

Same thing happens doing this.

In the case of docx, we really only support changes in the styles as listed in the manual.

Good to know. I think having this issue open is already a way to document the limitation.

I'm not completely sure what changes we can handle in the reference.pptx. (Original author of this module isn't active now, and I don't know a lot about this format.)

Yeah I understand. I opened this mainly for documenting the issue really.

I could try help, but I need to understand how PPTX writer works. I do know a little about openxml but not specifically about this templating thing.

I believe this should be label as powerpoint issue, and kept opened so that users doing this type of customization know this does not work correctly.