title: mPDF not being consistent with the style/formatting when generating the PDF output
body: <p>I am using mPDF to print a long list of A4s with some dynamically generated content (PHP and MySQL). It creates around 150 pages everytime someone clicks on a link to generate the PDF file. </p>
  
  <p>Our server used to have the mPDF version 6 before and PHP 5.1, this list was being generated flawlessly. Since we updated our servers to PHP 7, we had to update the mPDF version too, we have installed the latest version with composer, the file now generated is inconsistent in style every few pages (it is not a consistent number so maybe is not an issue with the loop itself it looks like something is breaking randomly).</p>
  
  <p>So basically the code goes like this, query the DB prior to this, then a foreach to go over every result in the query and generate a page with the data kinda like the below:</p>
  
  <pre><code>use Mpdf\Mpdf;
  $mpdf = new Mpdf([
      'format' =&gt; 'A4',
      'margin_left' =&gt; 20,
      'margin_right' =&gt; 20,
      'margin_top' =&gt; 10,
      'margin_bottom' =&gt; 30,
      'margin_header' =&gt; 0,
      'margin_footer' =&gt; 0,
  ]);
  
  $mpdf-&gt;charset_in='UTF-8';
  foreach (...) {
      $html = 'html code here'
  }
  
  $mpdf-&gt;WriteHTML($html);
  $mpdf-&gt;Output('list.pdf','I');
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/sSq2F.png" rel="nofollow noreferrer">this is the correct page</a></p>
  
  <p><a href="https://i.stack.imgur.com/pBOTL.png" rel="nofollow noreferrer">this is the next page before it brakes</a></p>
  
  <p><a href="https://i.stack.imgur.com/9qh4A.png" rel="nofollow noreferrer">this is the broken page</a></p>
  
  <p>The after it starts generating the pages correctly again, until it breaks... and then it goes like this until the end of the foreach loop.</p>
  
  <p>Any ideas? I've tried removing the inline CSS, changing the html content here and there but no luck so far... the most interesting thing is that everything goes bigger (images, texts, spaces, etc.)...</p>
  
  <p>Thank you so much any help is appreciated... :)</p>