I am using PHP-phantomjs and following the document. I can output pdf and img. http://jonnnnyw.imtqy.com/php-phantomjs/
but I have a page break problem. when the diagrams are at the end of the page but are full, they will be divided on another page, for example, a snapshot:
I found some tips:
<div id="main" style="page-break-inside: avoid;"></div>
But it does not work, maybe I'm wrong. And if this is a solution, then I have to write this in every html element? That sounds good.
source share