Hacker News new | ask | show | jobs
by kierenj 2946 days ago
This is probably a general headless-Chrome question, but - with something like this, how would you go about specifying margins, page breaks, etc?
1 comments

For the margins there is a global setting in the API that will set the specified margins on the entire document. You can specify additional margins on top of this by setting a margin in css.

Page breaks are controlled by the CSS properties page-break-after, page-break-before and page-break-inside.