title: mPDF issue with SLIM 3
body: <p>iam building a application in SLIM 3 where i need to generate a PDF Certificate.
  so i have added mPDF library extension in my SLIM application.
  and i tried to generate a test pdf with:</p>
  
  <pre><code>use Mpdf\Mpdf;
  use Slim\Http\Request;
  use Slim\Http\Response;
  /**
   * Class GenerateCertificate
   * @package saikatbepari\pdf
   */
   class GeneratePDF
   {
  
     public function generateCertificate(Request $request, Response $response)
    {
      $response = $response-&gt;withHeader( 'Content-type', 'application/pdf' );
      $mpdf = new Mpdf(['tempDir' =&gt; '../tmp']);
      $mpdf-&gt;WriteHTML('&lt;h1&gt;Hello world!&lt;/h1&gt;');
      $mpdf-&gt;Output();
    }
  
  
  }
  </code></pre>
  
  <p>and the output which i got is :</p>
  
  <p><a href="https://i.stack.imgur.com/vMxQT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vMxQT.png" alt="enter image description here"></a></p>
  
  <p>can anyone please help me out, what is the issue and how to fix it.
  any help would be appriciated.</p>