title: I am Stuck with the error Class 'Mpdf\Mpdf' not found -php pdf creation
body: <p>i've installed <code>mpdf</code> library with command <code>composer require mpdf/mpdf</code>.And it is installed in the location <code>vendor/mpdf/src/Mpdf.php</code>. And <code>composer_autoload</code> is <code>true</code> in <code>config\autoload.php</code>.
  with the below code, am getting the error <code>Class 'Mpdf\Mpdf' not found</code>. commenting <code>use Mpdf\Mpdf;</code> &amp; uncommenting the lines i've commened below shows the error   <code>require_once(C:\xampp\htdocs\abcd\application\controllersvendor/mpdf/src/Mpdf.php): failed to open stream: No such file or directory</code>.</p>
  <p>My <code>php version</code> is <code>7.3.3</code>.</p>
  <p>How can i fix this? Can i get some help?</p>
  <p><strong>Controller</strong></p>
  <pre><code>&lt;?php
  
  if (!defined('BASEPATH')) exit('No direct script access allowed');
  
  use Mpdf\Mpdf;
  //use \Mpdf\Mpdf;  //error- Class 'Mpdf\Mpdf' not found
  
  &lt;!--For the below 3, the error/warning is - `failed to open stream: No such file or directory` --&gt;
  
  //require_once __DIR__.'vendor/mpdf/src/Mpdf.php';  
  //require_once __DIR__ . '/vendor/autoload.php';
  //include_once('/mpdf/mpdf.php');
  
  class Reports extends Layout_Controller
  {
     public function downloadReport(){
          $fileName=$this-&gt;input-&gt;get('var');
          $mpdf=new Mpdf();
          $html=file_get_contents('reports/'.$fileName);
          $mpdf-&gt;WriteHTML($html);
          $mpdf-&gt;Output();
                  
      }
  }
  </code></pre>
  <p><strong>composer.json</strong></p>
  <pre><code>&quot;require&quot;: {
          &quot;php&quot;: &quot;&gt;=5.3.7&quot;,
          &quot;mpdf/mpdf&quot;: &quot;^8.0&quot;
      }
  </code></pre>
  <p>Lines commented in this code are what i've tried .</p>