astefanutti / decktape

PDF exporter for HTML presentations
MIT License
2.16k stars 175 forks source link

Images not shown in PDF output (but are correct in PNG and browser) #297

Closed krisvanrens closed 9 months ago

krisvanrens commented 10 months ago

Hi!

I'm using your great tool Decktape to export reveal.js-based presentations on programming.

To support slides with multiple programming languages on a single slide, I added language logo annotations in CSS (using ::before and ::after selectors). The result looks like this:

However, when using the multiple code blocks with the same language, the images are not showing up in the PDF anymore. They are correctly displayed in the browser and when using the --screenshot option to create images though. Here's what I mean:

It does actually work correctly when only using a just a single code block for each language. My feeling is that the CSS is of some influence here...but that doesn't explain why it just works in all browsers I've tested (or in the screenshot mode). Also, when using a single language only once, and another one twice, the logo for the single language is only shown.

Thanks in advance for looking at this! πŸ˜ƒ

Please find the links to input HTML file, and the output PDF attached below. If you need any more information, let me know!

krisvanrens commented 9 months ago

@astefanutti Thanks so much for looking into this. You do awesome work with decktape πŸ‘πŸ»