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

Is there a way to break the page intelligently based on the content? #60

Closed
sca88 opened this issue Aug 6, 2015 · 4 comments
Closed
Labels

Comments

@sca88
Copy link

sca88 commented Aug 6, 2015

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.

@marcbachmann
Copy link
Owner

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.

@marcbachmann marcbachmann mentioned this issue Aug 19, 2015
@marcbachmann
Copy link
Owner

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

@PanMan
Copy link

PanMan commented Nov 20, 2015

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

@molerat619
Copy link

any news?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants