title: Dynamic mpdf filename
body: <p>I am trying to create dynamic pdf file names based on the user who is logged in using mpdf</p>
  
  <p>now in my mind this (or something similar) should work - but doesn't. </p>
  
  <pre><code>$User = $_POST ['Username']
  $filename = $User
  $Extension = ".pdf";
  
  $mpdf-&gt;Output($filename, $Extension ,'F');
  </code></pre>
  
  <p><strong>Which returns the error:</strong> </p>
  
  <blockquote>
    <p><em>mPDF error: Incorrect output destination: .PDF</em></p>
  </blockquote>
  
  <p><strong>and</strong> </p>
  
  <pre><code>$mpdf-&gt;Output($filename $Extension ,'F');
  </code></pre>
  
  <p><strong>or</strong></p>
  
  <pre><code>$mpdf-&gt;Output($filename$Extension ,'F');
  </code></pre>
  
  <p><em>doesn't create the file.</em></p>
  
  <p><strong>This</strong></p>
  
  <pre><code>$mpdf-&gt;Output($filename,'F');
  </code></pre>
  
  <p><strong>creates the file but without the <code>.pdf</code> extension</strong></p>
  
  <p>Help?</p>