title: itext 7 html to pdf with page size detection
body: <p>I am using itext 7 to render HTML templates (Velocity) to PDF, then to PNG (Apache PdfBox), for thermal printer printing.</p>
  
  <p>My template is rendered as :</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
      &lt;style&gt;...&lt;/style&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;div id="container"&gt;...&lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>My container has a fixed width to 512px. I would like to measure the rendered height of the html, and then render it as a single page PDF with page height = measured height.</p>
  
  <p>But the rendered size is not the expected size. I expect to have a rendered width of 512px, but the layoutResult returns a width of 385 (instead of the expected 512).</p>
  
  <p>Which parameter have I missed ?
  Thanks.</p>