TCPDF ERROR: Some data has already been output to browser, can’t send PDF file

TCPDF ERROR: Some data has already been output to browser, can’t send PDF file

Above message show that TCPDF Header yet not clear. you should clear header.

just use below code :

 ob_end_clean();
echo $pdf->Output(‘SE-‘.$data[‘first_name’].pdf’,’D’);

If you face any problem just reply me.