title: wkhtmltopdf text split across 2 pages
body: <p>I am using wkhtmltopdf (through the 'pdfkit' ruby gem) to generate pdf from html. There is a section in the page where the text content is lengthy, and it usually spans 2 (or more) pages. What happens sometimes is that a line of text is split across pages. Here's an image to help you understand what I mean: </p>
  
  <p><img src="https://i.stack.imgur.com/dN3rU.png" alt="enter image description here"></p>
  
  <p>Now I have done my fair bit of research on this: for example I have tried CSS fix on the sorrounding div (which was suggested in some other stackoverflow questions), like so:</p>
  
  <pre><code>page-break-inside:avoid !important;
  </code></pre>
  
  <p>and/or</p>
  
  <pre><code>page-break-before: always !important;
  </code></pre>
  
  <p>didn't work.</p>
  
  <p>I have also tried:</p>
  
  <pre><code>display: block !important;
  </code></pre>
  
  <p>which didn't work either.</p>
  
  <p>Does anyone know how to fix this problem?</p>
  
  <p>FYI: I am using the latest version of wkhtmltopdf: wkhtmltopdf-0.11.0_rc1</p>