I am trying to install the magento2-pdf-generator2 extension, but I first need to install the mpdf library, I ran the `composer require mpdf/mpdf` command and then ran `php bin/magento setup:upgrade` and `php bin/magento setup:static-content:deploy` to clear the caches. 

I tried the following example example and put it in a file called test1.php in the root directory:

    require_once __DIR__ . '/vendor/autoload.php';
    
    $mpdf = new \Mpdf\Mpdf();
    $mpdf->WriteHTML('<h1>Hello world!</h1>');
    $mpdf->Output();

But I am getting an error:

    [31-May-2017 16:30:00 UTC] PHP Fatal error:  Uncaught Error: Class 'Mpdf\Mpdf' not found in /home/public_html/test1.php:4
    Stack trace:
    #0 {main}
      thrown in /home/public_html/test1.php on line 4

all that I have in my test file is:

    <?php
    require_once __DIR__ . '/vendor/autoload.php';
    
    $mpdf = new \Mpdf\Mpdf();
    $mpdf->WriteHTML('<h1>Hello world!</h1>');
    $mpdf->Output();
    ?>

I do have the mbstring, gd, zlib and bcmath extensions enabled. I am unsure why it isn't loading