title: knp_snappy page break in generated PDF
body: <p>I'm working on Symfony2 project to generate PDF from HTML view. Following is from config.yml</p>
  
  <pre><code>knp_snappy:
  pdf:
      enabled:    true
      binary:     /path/to/my/wkhtmltopdf
      options:
          no-stop-slow-scripts: ~
          enable-javascript: ~
          use-xserver: ~
          page-size: A4
          dpi: 300
  </code></pre>
  
  <p>Now I want to know if the DIV is overlapping on the page edges, if so add a page break before DIV. It is currently displaying as follow.</p>
  
  <p><a href="https://i.stack.imgur.com/lv0hM.png" rel="noreferrer"><img src="https://i.stack.imgur.com/lv0hM.png" alt="enter image description here"></a></p>
  
  <p>I've tried to get the height of DIVs and compare it with height of page, but it didn't work. </p>
  
  <p>Is there any solution to know when DIV is overlapping or auto breaking the page when something is overlapping ?</p>