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

Animated gifs aren't being exported to pptx #196

Closed
asm0dey opened this issue Jan 3, 2020 · 4 comments
Closed

Animated gifs aren't being exported to pptx #196

asm0dey opened this issue Jan 3, 2020 · 4 comments

Comments

@asm0dey
Copy link

asm0dey commented Jan 3, 2020

When I'm adding animated gif to my presentation like this:

---
<!--
_class:
-->

<style scoped>
section img{
    position: absolute;
    right: 0;
    bottom: 0;
}
</style>

![bg left:30% fit](images/VM.png)

# Django

- А где логика?

![](images/7VE.gif)

They are being displayed correctly in html, but not in PPTX/PDF, there they are just static images.

@yhatt
Copy link
Member

yhatt commented Jan 6, 2020

Any kind of animations and interactives are lost in PPTX conversion because we are rendering each slide pages as static image.

If we supported these, have to work for reproducing HTML rendering in PPTX. Honestly it's like a re-invintention of browser, and not realistic within the scope of Marp project.

There is similar discussion in #166 (comment).

@asm0dey
Copy link
Author

asm0dey commented Jan 6, 2020

TBH I've already discovered it while investigating structure of generated PPTX :)
Possibly there is a way to cut animated GIFs out of source and pasting them into slide at computed coordinates?

@yhatt
Copy link
Member

yhatt commented Jan 6, 2020

If you don't mind hacking Marp CLI, you can detect images from rendered HTML by Chrome / Chromium through Puppeteer, and add rendered animation GIF through PptxGenJs addImage() method.

Please remember a way to place image is not only <img>. Marp may take <figure> and style (background-image). Sometimes they also should consider visibility, z-index, overlapped text, filter, and a lot of expressive CSS.

...Yep, it's unrealistic for us. :p

@asm0dey
Copy link
Author

asm0dey commented Jan 6, 2020

OK, fair enough, I'll stick with HTML view :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants