title: MPDF error when generating to PDF
body: <p>I'm having issues generating HTML/PHP code to PDF. Im using mPdf
  Here is my code:</p>
  
  <pre><code>&lt;table id="packing_slip"&gt;
  
  &lt;?php
  
  foreach($sheets as $s):
      echo "&lt;tr&gt;";
      echo "&lt;td&gt;";
      $name= explode(' ',$s['customer_name'])
      ?&gt;
      &lt;div style="text-align: center"&gt;
      &lt;/div&gt;
      &lt;h2 style="text-align: center"&gt;Hi &lt;?php echo $name[0] ?&gt;!&lt;/h2&gt;
      &lt;div align="center"&gt;
          &lt;br&gt; Here is your delivery for: &lt;br&gt;
          &lt;?php echo date('l, F dS', strtotime($s['delivery_week']));?&gt;
          &lt;br&gt;
          ORDER NO. &lt;?php echo $s['order_id'] ?&gt;&amp;nbsp; | &amp;nbsp;  CUSTOMER NO.&lt;?php echo $s['client_id'] ?&gt;
          &lt;?php $query="select * from orders left join deliveries on orders.id = deliveries.order_id left join deliveries_meals on deliveries.id = deliveries_meals.delivery_id where orders.id = '{$s['order_id']}'";
          $result_main = mysqli_query($conn,$query);
          $row_main = mysqli_fetch_assoc($result_main);
  
          $query_meals = "select label, subtitle, meals.name from meal_options left join meals on meal_options.meal_id = meals.id where meal_options.id ='{$row_main['meal_option_id']}' ";
          $result_meals = mysqli_query($conn,$query_meals);
          $row_meals = mysqli_fetch_assoc($result_meals);
  
          ?&gt;
          &lt;hr style="height: 5px;border-top:1px solid #000 !important;margin-bottom:0px"&gt;
          &lt;hr style="height: 5px;border-top:1px solid #000 !important;margin-top: 5px !important;"&gt;
      &lt;/div&gt;
      &lt;?php foreach($s['meals'] as $m):?&gt;
      &lt;h3&gt;&lt;?php echo $row_meals['name'];?&gt; &lt;/h3&gt;
      &lt;h5&gt;&lt;i&gt;&lt;?php
              if($row_meals['label'] != '' &amp;&amp; $row_meals['subtitle'] != ''){ echo $row_meals['subtitle'] . " &amp; " . $row_meals['label'];}
              elseif ($row_meals['label'] != '' ) {echo "with " . $row_meals['label'];}
              else{ echo $row_meals['subtitle'];}?&gt;&lt;/i&gt; &lt;/h5&gt;
      &lt;?php echo $m['count']?&gt; &amp;nbsp; SERVING SHIPPED&lt;br&gt;&lt;br&gt;
      COMPONENTS
      &lt;hr align = "left" style="width: 115px; border-top:1px solid #000 !important;margin-top: 5px !important;margin-bottom:0px"&gt;
      &lt;br&gt;
      &lt;?php if (@$m['components'][0] != ''){?&gt;
          &lt;?php foreach($m['components'] as $c):?&gt;
              &lt;?php echo $c?&gt;&lt;br&gt;
          &lt;?php endforeach;
      } else {echo "Everything is included in package. &lt;br&gt;";}
      ?&gt;
      &lt;br&gt;
      &lt;?php if($m['instructions'][0] != '' || $m['instructions'][1] !=''){?&gt;
          INSTRUCTIONS
          &lt;hr align = "left" style="width: 115px; border-top:1px solid #000 !important;margin-top: 5px !important;margin-bottom:0px"&gt;
          &lt;br&gt;
          &lt;?php if($m['instructions'][0] != ''){echo "Microwave : ".$m['instructions'][0];}?&gt;&lt;br&gt;&lt;br&gt;
          &lt;?php if($m['instructions'][1] != ''){ echo "Stovetop : ".$m['instructions'][1];}?&gt;&lt;br&gt;
      &lt;?php }?&gt;
      &lt;hr align="left" style="width: 400px; border-top:1px solid #000 !important;margin-top: 5px !important;margin-bottom:0px" &gt;
  &lt;?php endforeach;?&gt;
      &lt;hr align="left" style="width: 600px; border-top:1px solid #000 !important;margin-top: 5px !important;margin-bottom:0px" &gt;
      &lt;div align="center"&gt;&lt;h3&gt; Thank you,&lt;?php echo $name[0] ?&gt;!&lt;/h3&gt;
          &lt;hr style="width: 600px; border-top:1px solid #000 !important;margin-top: 5px !important;margin-bottom:0px" &gt;
      &lt;/div&gt;
      &lt;br&gt;
      &lt;br&gt;
      &lt;br&gt;
      &lt;br&gt;
      &lt;br&gt;
      &lt;/td&gt;
      &lt;/tr&gt;
  &lt;?php endforeach; ?&gt;
  
  &lt;/table&gt;
  
  &lt;?php
  
  include('mpdf60/mpdf.php');
  
  $mpdf=new mPDF('c','A4','','',32,25,27,25,16,13);
  $mpdf-&gt;debug = true;
  
  $mpdf-&gt;SetDisplayMode('fullpage');
  
  $mpdf-&gt;list_indent_first_level = 0; // 1 or 0 - whether to indent the first level of a list
  
  $mpdf-&gt;WriteHTML('&lt;p style="color:red;"&gt;Hello World&lt;br/&gt;Fisrt sentencee&lt;/p&gt;');
  
  $mpdf-&gt;Output();
  exit;
  ?&gt;
  </code></pre>
  
  <p>I put for now "Hello World" but I actually want to put my whole code, also I get this error:
  <code>Output has already been sent from the script - PDF file generation aborted.</code>
  How can I fix this? I am using FuelPhp, Im not sure how I can add it to the PDF, any ideas on how it can work. Because right now it is not even letting me put "Hello World"</p>