Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rendered pptx file is considered corrupted by MS PowerPoint #160

Closed
bgalartza opened this issue Apr 16, 2024 · 3 comments
Closed

Rendered pptx file is considered corrupted by MS PowerPoint #160

bgalartza opened this issue Apr 16, 2024 · 3 comments
Labels
bug Something isn't working high-prio to be addressed in next release

Comments

@bgalartza
Copy link

bgalartza commented Apr 16, 2024

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.

image

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

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
@erdos erdos added bug Something isn't working high-prio to be addressed in next release labels Apr 17, 2024
@erdos erdos mentioned this issue May 13, 2024
7 tasks
@erdos
Copy link
Owner

erdos commented May 14, 2024

Hey, thanks for the detailed bug report.

I did some investiation and it looks like the ability to rendering PPTX broke with the refactors of model.clj around early 0.5.x versions. The changes there were necessary to be able to implement some more complex logics (regarding reusing numbering and custom styling between document fragments), but they made the data model rigid and unable to render PPTX files.

I will continue research on how to represent PPTX files properly. There is a bit of a complication with the circular references between slideMaster and slideLayout files.

@erdos
Copy link
Owner

erdos commented May 21, 2024

Hello @bgalartza a fix has been implemented in #161 and I have just released version 0.5.8 with the improvements. Please test with your templates. 🙇

@bgalartza
Copy link
Author

Hi erdos,
We tested it with the templates we are using, and it works like a charm. We didn't find any issue. Thanks!

@erdos erdos closed this as completed May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working high-prio to be addressed in next release
Projects
None yet
Development

No branches or pull requests

2 participants