How to fix 'Data has already been sent to output, unable to output PDF file' in MPDF
PHP Snippet 1:
ob_start();
PHP Snippet 2:
ob_end_flush();
require_once __DIR__ . '/vendor/autoload.php';
$mpdf = new \Mpdf\Mpdf();
$mpdf->WriteHTML($html);
$mpdf->Output();