title: wkhtmltopdf variable DPIs and page sizes in pixels
body: <p>I am trying to test out a simple page that I wish to use to generate an A4 PDF at 300 DPI. Which I calculated to be 2480px wide and 3507px high;</p>
  
  <p>This is the HTML which I expected to create a single page PDF that has a red border around the edges. The problem is that I am getting PDF that is four pages long.</p>
  
  <pre><code>&lt;html&gt;
      &lt;head&gt;
          &lt;style&gt;
              body {
                  margin: 0;
                  padding: 0;
                  width:2480px;
                  height:3507px;
              }
          &lt;/style&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;div style="width:2480px; height:3507px; border:1px solid red;"/&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>This is the command I am using to generate the PDF:</p>
  
  <pre><code>wkhtmltopdf --disable-smart-shrinking --page-size A4 --dpi 300 --margin-bottom 0 --margin-left 0 --margin-right 0 --margin-top 0 test.html test.pdf
  </code></pre>
  
  <p>I can't work out if I am doing something wrong, such as missing a setting or calculating the size of my page incorrectly?</p>
  
  <p>Any help would be appreciated.</p>