astefanutti / decktape

PDF exporter for HTML presentations

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Set paper dimensions of exported PDF

jmuheim opened this issue · comments

Hello

While I can set the dimensions of exported screenshots, I seem not to be able to do this for the exported PDF.

By default, the dimensions of the PDF seems to be not the default 4:3 that I need for printing on paper, but it seems to be some widescreen format, which leads to some ugly display problems. For example, while the TOC looks nice in the exported screenshot...

image

...it looks mis-positioned (too low) in the PDF:

image

How can I fix this, so the PDF uses a 4:3 dimension?

Oh, I just found the option:

$ decktape -s 1600x1200

What numbers would you recommend to use for traditional A4 prints?

We could add a format option to the CLI that would enable passing standard print formats, and use the Puppeteer API:

https://github.com/puppeteer/puppeteer/blob/v3.0.4/docs/api.md#pagepdfoptions