stencil
stencil copied to clipboard
Rendered pptx file is considered corrupted by MS PowerPoint
Describe the bug We have a pptx template file that is opened without any errors by MS PowerPoint 365. We render that file using the Clojure API (using stencil version 0.5.7). The rendered file opens in LibreOffice Impress 7.4.7, but some visual elements and styles are missing. The same file is considered corrupt when we try to open it in MS PowerPoint 365, and it has to be fixed by PowerPoint before we can do anything with it.
We have used the "Open XML SDK 2.5 Productivity Tool"[1] to validate the rendered file, and it reports several errors about missing references. Here below there is an screenshot of the tool with the error report.
We have tried with different template files and we always got the same kind of errors. The attached template is just a very simple template to be able to reproduce the issue. We don't even have any placeholder to be rendered.
[1] https://github.com/dotnet/Open-XML-SDK/releases/tag/v2.5
To Reproduce
(require '[stencil.api :as stencil])
(require '[clojure.java.io :as io])
(stencil/render! (stencil/prepare (io/file "document-template.pptx")) {} :output (io/file "document-rendered.pptx"))
Expected behavior The rendered file is considered valid by both MS PowerPoint 365 and the Open XML SDK 2.5 Productivity Tool.
Documents
-
Template file: document-template.pptx
-
Rendered file: document-rendered.pptx
Office versions:
- MS PowerPoint 365
- Libreoffice 7.4.7
Environment where template is rendered:
- Stencil version: 0.5.7
- Java version: 19
- Operating System version: Debian Bookworm