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

Scaling issue with ImpressJS presentations PDF export #107

Open
pjvilloud opened this issue Sep 2, 2017 · 4 comments

Comments

Projects
None yet
3 participants
@pjvilloud
Copy link

commented Sep 2, 2017

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 !

@astefanutti

This comment has been minimized.

Copy link
Owner

commented Sep 4, 2017

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.

@astefanutti astefanutti changed the title PDF different from screenshots Scaling issue with ImpressJS presentations PDF export Sep 4, 2017

@astefanutti astefanutti added the Chrome label Sep 4, 2017

@astefanutti astefanutti added the bug label Sep 19, 2017

@astefanutti astefanutti self-assigned this Sep 25, 2017

@schrieveslaach

This comment has been minimized.

Copy link

commented May 3, 2019

I can confirm this issue. @astefanutti, have you made any progress on this issue?

@schrieveslaach

This comment has been minimized.

Copy link

commented May 3, 2019

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
@astefanutti

This comment has been minimized.

Copy link
Owner

commented May 3, 2019

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.