title: How can I set custom page width and height in TCPDF?
body: <p>I am using TCPDF to generate a PDF file from HTML content. I want to set the  page width and height to the custom values 400px and 300px.</p>
  
  <p>I used the following code</p>
  
  <pre><code> $pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
  </code></pre>
  
  <p>Where</p>
  
  <ul>
  <li><code>PDF_PAGE_ORIENTATION</code> is <code>p</code>;</li>
  <li><code>PDF_UNIT</code> is <code>mm</code>;</li>
  <li><code>PDF_PAGE_FORMAT</code> is <code>A6</code>.</li>
  </ul>