title: PHP TCPDF unwanted blank page inside HTML markup
body: <p>I try to generate some text information in TCPDF using writeHTML method. But TCPDF sometimes creates extra blank page after automatic pagebreak inside table structure (I use table associated tags to format text positions).</p>
  
  <p>Bug example screenshot:</p>
  
  <p><img src="https://i.stack.imgur.com/7TQrc.png" alt="Bug example screenshot"></p>
  
  <p>UPDATE: Here is the simplified code example:</p>
  
  <pre><code>&lt;?php
  $pdf = new TCPDF('P', 'mm', 'A4', true, 'UTF-8', false);
  $pdf-&gt;setPrintHeader(false);
  $pdf-&gt;setPrintFooter(false); 
  $pdf-&gt;SetMargins('20', '20', '15');
  $pdf-&gt;SetAutoPageBreak(true, '25');  
  $pdf-&gt;SetFont('freeserif', '', 11);  
  $pdf-&gt;AddPage(); 
  $tagvs = array(           
      'p' =&gt; array(0 =&gt; array('h' =&gt; 0, 'n' =&gt; 0), 1 =&gt; array('h' =&gt; 1, 'n' =&gt; 1)),
      'ul' =&gt; array(0 =&gt; array('h' =&gt; 0.0001, 'n' =&gt; 1), 1 =&gt; array('h' =&gt; 1, 'n' =&gt; 1)),
      'ol' =&gt; array(0 =&gt; array('h' =&gt; 0.0001, 'n' =&gt; 1), 1 =&gt; array('h' =&gt; 1, 'n' =&gt; 1)),   
      'div' =&gt; array(0 =&gt; array('h' =&gt; 0.0001, 'n' =&gt; 1), 1 =&gt; array('h' =&gt; 0.0001, 'n' =&gt; 1)),
      'hr' =&gt; array(0 =&gt; array('h' =&gt; 0.0001, 'n' =&gt; 1), 1 =&gt; array('h' =&gt; 0.0001, 'n' =&gt; 1)),
  );
  $pdf-&gt;setHtmlVSpace($tagvs);
  $html = '&lt;p&gt;Some Content&lt;/p&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Some content&lt;/td&gt;&lt;td&gt;Some content&lt;/td&gt;&lt;/tr&gt;';
  //READ NEXT LINE PLEASE
  $html .= '&lt;tr&gt;&lt;td&gt;BEFORE THIS TR COULD BE BLANK PAGE IN GENERATED PDF&lt;/td&gt;&lt;td&gt;IT DEPENDS OF TABLE CONTENT LENGTH&lt;/td&gt;&lt;/tr&gt;';
  //READ PREVIOUS LINE PLEASE
  $html .= '&lt;tr&gt;&lt;td&gt;Some content&lt;/td&gt;&lt;td&gt;Some content&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;Some Content&lt;/p&gt;&lt;p&gt;Some Content&lt;/p&gt;';   
  $pdf-&gt;writeHTML($html, true, false, true, false, ''); 
  $pdf-&gt;Output('document.pdf', 'I');
  ?&gt;
  </code></pre>
  
  <p>UPDATE: More demonstrative screenshot:
  <a href="https://i.stack.imgur.com/uy26E.png" rel="nofollow noreferrer">Table cell is going to the end of the page</a></p>
  
  <p>How can I avoid it? Many thanks!</p>