title: Warning: Invalid argument supplied for foreach() in mpdf.php on line 11008
body: <p>I am using mPDF in my web application.</p>
  
  <p>I have to create invoice documents with the help of Mpdf..
  So html table with large number of rows (ie: if it exists single page) rise this error:</p>
  
  <blockquote>
    <p>Warning: Invalid argument supplied for foreach() in MPDF56/mpdf.php on
    line 11008</p>
  </blockquote>
  
  <p>I am using following code to generate pdf:</p>
  
  <pre><code>require_once(MPDF_PATH);
  $mpdf=new mPDF('c','A4','0','',2,2,2,2,1,1);
  $stylesheet = file_get_contents(dirname(__FILE__).'/invoice_print.css');
  $mpdf-&gt;WriteHTML($stylesheet,1);
  $html .="";
  $mpdf-&gt;WriteHTML($html);
  $mpdf-&gt;Output("$fileName",'D'); 
  </code></pre>
  
  <p>I have tried with/without arguments in constructor of Mpdf.
  And I found mpdf works with first 4 params without any problem...</p>
  
  <pre><code>$mpdf=new mPDF('c','A4','0','')
  </code></pre>
  
  <p>But when I add "margins" (ie: 5-8) params, will throws error described above.</p>
  
  <p>Have anyone has a fix for this???</p>
  
  <p>I have tried with mPDF 5.3 and 5.6</p>