title: Convert php file to pdf file by using mPDF
body: <p>I have just started to use mPDF. I got stuck at very beginning. I am trying to include my dynamic php file and convert it to pdf file by using mPDF. Here is my approach:This is my function to convert file to pdf</p>
  
  <pre><code>&lt;?php 
  
  include('MPDF57/mpdf.php');
  include('template1.php');
  $html= "template1.php";
  $mpdf=new mPDF(); 
  $mpdf-&gt;SetDisplayMode('fullpage');
  $mpdf-&gt;WriteHTML(file_get_contents($html));
  $mpdf-&gt;Output('result.pdf','F');
  exit;
  
  ?&gt;
  </code></pre>
  
  <p>My template.php file is only a html invoice table layout in where several content come from database as: user address, invoice table and so on... I do want to convert the html layout and content from the template.php file to pdf </p>
  
  <p>But it is not outputing the file as a pdf file. What am I missing here?</p>