Node-html-pdf: Is there a way to break the page intelligently based on the content?

Created on 6 Aug 2015  路  4Comments  路  Source: marcbachmann/node-html-pdf

Lets say I pass in a long html content and I would want to break the page at a particular meaningful spot, can i do that? Is there some parameter that i can leverage for it.

faq

Most helpful comment

any news?

All 4 comments

There are the page-break css properties.
I've never used page-break-inside: avoid;, but that might be the one you can use. Probably you can apply it to the p tag or something else.
https://developer.mozilla.org/en-US/docs/Web/CSS/page-break-after
https://developer.mozilla.org/en-US/docs/Web/CSS/page-break-before
https://developer.mozilla.org/en-US/docs/Web/CSS/page-break-inside

Other than that, there's nothing I know of.

Duplcated of #49. I'll add that to a frequently asked questions section later.

page-break-inside: avoid; seems to be ignored. I read somewhere that it's supported in PhantomJS > 2.0, but the node module is on 1.9x

any news?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jimit-hothi picture jimit-hothi  路  4Comments

rayax86 picture rayax86  路  5Comments

vivekiyer114 picture vivekiyer114  路  5Comments

tashikomaaa picture tashikomaaa  路  5Comments

adman020 picture adman020  路  5Comments