decktape
decktape copied to clipboard
Scaling issue with ImpressJS presentations PDF export
Hello all and thanks for this program !
I'm having an issue trying to export my ImpressJS presentation to PDF.
I'm using this command : decktape file:///path/index.html test.pdf -s 1920x1080 --screenshots --screenshots-size 1920x1080 and screenshots are perfect but the generated PDF is different : the zoom level appears to be wrong, the size of the font too... Any idea why the PDF is different ?
If needed, I can provide a pdf sample.
FYI I installed decktape on a linux machine with npm.
For now, I exported my slides to png and I use the convert tool of linux.
Thanks !
Ah I've noticed that issue with ImpressJS presentations. I've tried tuning the scale parameter of the Page.pdf API but that gives satisfactory results for some presentations only.
I think that's an issue at the level of Chrome PDF renderer. I was waiting for isolating the issue with a minimal use case (ideally by removing DeckTape and ImpressJS out of the equation) before reporting it.
I can confirm this issue. @astefanutti, have you made any progress on this issue?
I have a workaround:
mkdir /tmp/shots
decktape --size 1920x1080 --screenshots --screenshot-size 1920x1080 --screenshots-directory /tmp/shots http://0.0.0.0:8000 handout.pdf
cd /tmp/shots
for f in $(ls)
do
mv $f $(echo $f | sed -e 's/handout_//g' -e 's/_1920x1080.png//g' | awk '{printf "%05d\n", $0}').png
done
cd -
pdfjoin /tmp/shots/*.png --outfile handout.pdf
@schrieveslaach I haven't been able to make any progress on this 😞. As you've found out, rendering to PNG isn't affected by the issue. It seems there are some work on Chromium side that should improve the layout for PDF rendering. I hope it'll solve that issue. Otherwise, we'll have to get in touch with the Chromium team and iterate.