title: Using mpdf library in codeigniter return error
body: <p>Error</p>
  
  <blockquote>
    <p>A PHP Error was encountered</p>
    
    <p>Severity: Warning</p>
    
    <p>Message: preg_match() expects parameter 2 to be string, object given</p>
    
    <p>Filename: libraries/mpdf.php</p>
    
    <p>Line Number: 22307</p>
  </blockquote>
  
  <p>Backtrace:</p>
  
  <p>File: D:\xamp\htdocs\ci_test\application\libraries\mpdf.php
  Line: 22307
  Function: preg_match</p>
  
  <p>File: D:\xamp\htdocs\ci_test\application\libraries\mpdf.php
  Line: 13118
  Function: ReadCharset</p>
  
  <p>File: D:\xamp\htdocs\ci_test\application\controllers\Welcome.php
  Line: 28
  Function: WriteHTML</p>
  
  <p>File: D:\xamp\htdocs\ci_test\index.php
  Line: 292
  Function: require_once</p>
  
  <p>this is my controller</p>
  
  <pre><code>    $this-&gt;load-&gt;library('mpdf');
  
      $html = $this-&gt;load-&gt;view('welcome_message');
  
      $this-&gt;mpdf-&gt;WriteHTML($html);
      $this-&gt;mpdf-&gt;Output();
  </code></pre>