see #12 for details
I just watched the video "Creating a PDF file in PHP using Mpdf" and I wondered what that parameter 'S' could mean in this line:
$contractNotePdf = $mpdf->output('', 'S');
So, I looked into the lib and I found that they use
Mpdf\Output\Destination::STRING_RETURN for testing. (This is basically 'S')
I'd suggest to use the line as
$contractNotePdf = $mpdf->output('', Mpdf\Output\Destination::STRING_RETURN);
This way it would be much easier to understand the meaning of this parameter.