title: wkhtmltopdf repeating thead headers overlapping content
body: <p>We're embedding wkhtmltopdf (0.12.1) in a Java application, using stdin and stdout for input/output. We want multiple (different) headers in our PDF, so instead of using the <code>--header-html</code> option we're using a <code>thead</code>, which is repeated on several pages. Here's a little example HTML:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;body&gt; 
      &lt;table style="page-break-after: always;"&gt;
          &lt;thead&gt;
              &lt;tr&gt;
                  &lt;th&gt;My first header&lt;/th&gt;
              &lt;/tr&gt;
          &lt;/thead&gt;
          &lt;tbody&gt;
              &lt;tr&gt;
                  &lt;td&gt;First content&lt;/td&gt;
              &lt;/tr&gt;
          &lt;/tbody&gt;
      &lt;/table&gt;
      &lt;table&gt;
          &lt;thead&gt;
              &lt;tr&gt;
                  &lt;th&gt;My second header&lt;/th&gt;
              &lt;/tr&gt;
          &lt;/thead&gt;
          &lt;tbody&gt;
              &lt;tr&gt;
                  &lt;td&gt;Second content&lt;/td&gt;
              &lt;/tr&gt;
          &lt;/tbody&gt;
      &lt;/table&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>So far so good. Problems arise when the content spans multiple pages. The header is then displayed on top of the content, overlapping it. Example <a href="https://gist.github.com/idserda/1cd9ba04732b2a2e6b90">html</a> and <a href="https://www.dropbox.com/s/tkoqjnnssniq7m3/example.pdf">PDF</a>. Notice that the second header is rendered just fine, since the <code>tr</code> only spans one page.  </p>
  
  <p>Other people have had similar problems. There are some workarounds for this when you're using the <code>--header-html</code> option, such as adding <code>--header-spacing</code> or <code>--margin-top</code>, but these options have no effect on the repeated <code>thead</code>. Any ideas?</p>