title: HTML2PDF page size
body: <p>I'm using PHP &amp; HTML2PDF lib to generate pdf files.But what I'm trying to do is to generate a pdf file with the pageSize (width/height) as html content size. How can I achieve this?</p>
  
  <p>My html content is:</p>
  
  <pre><code>&lt;page format="432x240" orientation="L" backcolor="#FFFFFF" style="font: arial;"&gt;
  &lt;div class="image"&gt;
      &lt;span class="firstname"&gt;$fname&lt;/span&gt;
      &lt;span class="lastname"&gt;$lname&lt;/span&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p></p>
  
  <p>The css for image class is: </p>
  
  <pre><code>position: relative;width: 100%; /* for IE 6 */ background-image: url(../img/test.png);height: 240px; width: 432px;top: 50%;
  </code></pre>
  
  <p>And my PHP code is:</p>
  
  <pre><code>$html2pdf = new HTML2PDF('P', 'A4', 'en', true, 'UTF-8', 0);
  $html2pdf-&gt;pdf-&gt;SetDisplayMode('fullpage');
  
  $contentTpl = $this-&gt;renderPartial('template_01', array('fname' =&gt; $firstname, 'lname' =&gt; $lastname), true);
              $html2pdf-&gt;writeHTML(utf8_encode($contentTpl));
  </code></pre>