title: Error while creating a PDF document with PHPexcel+Mpdf
body: <p>I am trying to create a PDF document using PHPexcel and MPDF library using the below code.But I get the error - "Adobe Reader could not open '01simple-6.pdf' because it is either not a supported file type or because the file has been damaged(for example, it was sent as an email attachment and wasn't correctly decoded)." What am I doing wrong?</p>
  
  <pre><code>&lt;?php
  error_reporting(E_ALL);
  ini_set('display_errors', TRUE);
  ini_set('display_startup_errors', TRUE);
  date_default_timezone_set('Europe/London');
  
  if (PHP_SAPI == 'cli')
      die('This example should only be run from a Web Browser');
  
  /** Include PHPExcel */
  require_once '../Classes/PHPExcel.php';
  $rendererName = PHPExcel_Settings::PDF_RENDERER_MPDF;
  $rendererLibrary = 'mpdf.php';
  $rendererLibraryPath = dirname(__FILE__).'/../../MPDF56/' . $rendererLibrary;
  
  // Create new PHPExcel object
  $objPHPExcel = new PHPExcel();
  
  // Set document properties
  $objPHPExcel-&gt;getProperties()-&gt;setCreator("Maarten Balliauw")
                               -&gt;setLastModifiedBy("Maarten Balliauw")
                               -&gt;setTitle("PDF Test Document")
                               -&gt;setSubject("PDF Test Document")
                               -&gt;setDescription("Test document for PDF, generated using PHP classes.")
                               -&gt;setKeywords("pdf php")
                               -&gt;setCategory("Test result file");
  
  
  // Add some data
  $objPHPExcel-&gt;setActiveSheetIndex(0)
              -&gt;setCellValue('A1', 'Hello')
              -&gt;setCellValue('B2', 'world!')
              -&gt;setCellValue('C1', 'Hello')
              -&gt;setCellValue('D2', 'world!');
  
  // Miscellaneous glyphs, UTF-8
  $objPHPExcel-&gt;setActiveSheetIndex(0)
              -&gt;setCellValue('A4', 'Miscellaneous glyphs')
              -&gt;setCellValue('A5', 'éàèùâêîôûëïüÿäöüç');
  
  // Rename worksheet
  $objPHPExcel-&gt;getActiveSheet()-&gt;setTitle('Simple');
  $objPHPExcel-&gt;getActiveSheet()-&gt;setShowGridLines(false);
  
  // Set active sheet index to the first sheet, so Excel opens this as the first sheet
  $objPHPExcel-&gt;setActiveSheetIndex(0);
  
  
  if (!PHPExcel_Settings::setPdfRenderer(
          $rendererName,
          $rendererLibraryPath
      )) {
      die(
          'NOTICE: Please set the $rendererName and $rendererLibraryPath values' .
          '&lt;br /&gt;' .
          'at the top of this script as appropriate for your directory structure'
      );
  }
  
  // Redirect output to a client’s web browser (PDF)
  header('Content-Type: application/pdf');
  header('Content-Disposition: attachment;filename="01simple.pdf"');
  header('Cache-Control: max-age=0');
  
  $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'PDF');
  $objWriter-&gt;save('php://output');
  exit;
  </code></pre>