decktape icon indicating copy to clipboard operation
decktape copied to clipboard

Set paper dimensions of exported PDF

Open jmuheim opened this issue 5 years ago • 2 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?

jmuheim avatar May 13 '20 13:05 jmuheim

Oh, I just found the option:

$ decktape -s 1600x1200

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

jmuheim avatar May 13 '20 13:05 jmuheim

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

astefanutti avatar May 14 '20 18:05 astefanutti