title: MPDF - fseek error
body: <p>I am trying to merge files together into one pdf. The files could be pdf, png or jpg files. Images work fine, its only when I try to export the pdf files that I get an error. The error is show below.</p>
  
  <pre><code>Message: fseek(): stream does not support seeking
  </code></pre>
  
  <p>I thought I found a solution from various forums relating to the path of the file. However, if I change the path it shows this error</p>
  
  <pre><code>mPDF error: Cannot open http://192.168.2.35/marine/certificate_files/a025ad3d40b22ac760ba7af7b6bb259d.pdf
  </code></pre>
  
  <p>My controller code is below</p>
  
  <pre><code>include('mpdf/mpdf.php');
      $mpdf=new mPDF();
      $mpdf-&gt;SetImportUse();
      $mpdf-&gt;SetFooter($personnel_data-&gt;firstname . ' ' . $personnel_data-&gt;lastname . '|{PAGENO}|' . $personnel_data-&gt;ID_number );
  
      foreach($certificate_data as $certificates)
      {
          $certificate_extension['type'] = explode('.',$certificates-&gt;certificate_name);
  
          if($certificate_extension['type'][1]==='pdf')
          {
              $pagecount = @$mpdf-&gt;SetSourceFile('http://192.168.2.35/marine/certificate_files/' . $certificates-&gt;certificate_name);
              $tplId = $mpdf-&gt;ImportPage($pagecount);
              $mpdf-&gt;UseTemplate($tplId);
              $mpdf-&gt;WriteHTML('&lt;pagebreak&gt;');
          }
          if($certificate_extension['type'][1]!=='pdf')
          {
              $mpdf-&gt;WriteHTML('&lt;p&gt;&lt;img src="' . $this-&gt;config-&gt;base_url('assets/images/header-logo.png') . ' "&gt;&lt;/p&gt;');
              $mpdf-&gt;WriteHTML('&lt;style&gt;body {font-family: arial;}&lt;/style&gt;');
              $mpdf-&gt;WriteHTML('&lt;p&gt; ' . $certificates-&gt;certificate . ' - ' .  $certificates-&gt;expiry_dates . '&lt;/p&gt;');
              $mpdf-&gt;WriteHTML('&lt;p&gt;&lt;img src="' . $this-&gt;config-&gt;base_url('certificate_files/' . $certificates-&gt;certificate_name) . ' "&gt;&lt;/p&gt;');
              $mpdf-&gt;WriteHTML('&lt;pagebreak&gt;');
          }
          else
          {
              $mpdf-&gt;WriteHTML('');
          }
      }
  
      $mpdf-&gt;Output();
      exit;
  </code></pre>
  
  <p>If any help or guidance could slide my way form anyone I would be forever grateful! Thanks!</p>