title: Failed to load PDF document in chrome browser
body: <p>I'm using mPDF library for generating PDF files from HTML page. It is working nice in firefox but it is not display PDF file in chrome browser.</p>
  
  <p>I'm getting following error while generate PDF in chrome.</p>
  
  <p><a href="https://i.stack.imgur.com/RgNBq.png" rel="noreferrer"><img src="https://i.stack.imgur.com/RgNBq.png" alt="Getting error in chrome browser while generating PDF"></a> </p>
  
  <p>Following is my code for generate PDF using mPDF </p>
  
  <pre><code>ob_clean();
  header('Content-type: application/pdf');
  header('Content-Disposition: inline; filename="' . $yourFileName . '"');
  header('Content-Transfer-Encoding: binary');
  header('Accept-Ranges: bytes');
  $mpdf = new PDF( 'c','A4','','',15, 15,10,14,0,0);
  $mpdf-&gt;useOnlyCoreFonts = false;
  $mpdf-&gt;SetDisplayMode('real');
  $mpdf-&gt;list_indent_first_level = 0; // 1 or 0 - whether to indent the first level of a list
  $stylesheet = file_get_contents(APPPATH . 'third_party/mpdf/style.css');
  $mpdf-&gt;WriteHTML($stylesheet,1);
  $mpdf-&gt;WriteHTML($html);
  $mpdf-&gt;Output();
  </code></pre>