title: wkhtmltopdf page-break-after have whitespace
body: <p>I use <code>WKHTMLTOPDF</code> to generate a <em>PDF</em> from a printer-friendly webpage.
  I upgraded from version <strong>0.10.0 rc2</strong> to <strong>0.12.1</strong><em>(with patched qt)</em> but now when I use the <code>CSS</code> properties like <code>page-break-before:always;</code> it inserts a bunch of <em>whitespace</em>, and the <code>page-breake-inside:avoid;</code> doesn't work, it's magic.</p>
  
  <p>I use this call:  </p>
  
  <pre><code>/usr/local/bin/wkhtmltopdf --encoding 'UTF-8' 'page-to-print' '/tmp/PDFV59OZt'
  </code></pre>
  
  <p>I have tried with and without both <code>--print-media-type</code> and <code>--no-print-media-type</code>.</p>
  
  <p>When I render the printer-friendly page in my browser, and when I try to print it (before I make it a pdf) it works fine. </p>
  
  <p>examples of my CSS:</p>
  
  <pre><code>//if i want to make a static page-break between two elements
  page-break{
      page-break-after:always;
      clear:both;
      display:block;
  }
  //Avoid cutting images
  img{
      display:block;
      page-break-before:auto;
      page-break-after:auto;
      page-break-inside:avoid;
  }
  //avoid cutting text
  p,em,li,span,tr{ 
      page-break-inside:avoid; 
  }
  </code></pre>
  
  <p>Only page-break-after:always; works, but it inserts a bunch of white-space.
  Does anyone have any ideas for this?</p>