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
Inconsistent image size between pdf and screenshots when viewport-relative sizes are used #220
Comments
What presentation framework do you use? Could you try by increasing the viewport size with the |
I'm using reveal.js. If it can be useful for reproducing the bug I can open the private repository where the issue appears (I currently worked it around by regex-matching my code and enlarging |
That seems like #151. Unfortunately, this is due to rendering discrepancies between Chromium Web engine and the PDF export component. |
So I guess this is something upstream has to fix. Could you open a bug report to them? I'll 👍 it immediately. |
A bug report has been open since 2017: puppeteer/puppeteer#915 |
ARGH, it's open since sooo long... And they tagged it as "Chromium", so I wonder if it's something that should get opened directly on chromium: https://bugs.chromium.org/p/chromium/issues/list. |
I don't know enough about the internals of Chromium to know how to make a good bug report for this. But the good news is that there's a workaround: Chrome and Chromium seem to do fine at rendering reveal.js slides to pdf from a terminal command prompt, with none of the problems I see with puppeteer and decktape. Basically you want to serve your slides to
And it's easy enough to wrap this command line in a script to make things less cumbersome. |
@jonathan-g man you really saved my day. I enabled a double generation of my slides in CI, both via decktape and via chromium headless. They seem to work nicely. |
So happy I could help. |
I'm trying to correctly render in pdf this slide:
(snapshot generated by decktape)
Its resulting code is:
When rendering in pdf, however, the
vw
/vh
units seem to be broken and relative to something different than the page size, and images get rendered much smaller than they should be.Here is the generated slide pdf.
The text was updated successfully, but these errors were encountered: