6

I am using the PHP-phantomjs and follow the doc I can output pdf and img. http://jonnnnyw.github.io/php-phantomjs/

but I have problem with page break. when a charts in the end of the page,but overflowed, it will be split in another page,like the capture below: Page capture

I found some advice:

<div id="main" style="page-break-inside: avoid;"></div>

But it doesn't work, or maybe I get it wrong. And if it is the solution, that means I have to write this in every element of html? Sounds not good.

Christos Lytras
  • 36,310
  • 4
  • 80
  • 113
JK.
  • 101
  • 7

1 Answers1

0

Here I found some solutions on github. As I understand PhantomJS has bug whith scales the page. Try to add to body:

body { zoom : 0.75 }
Nutscracker
  • 702
  • 3
  • 9