Some data has already been output to browser, can't send PDF file tcpdf code example
Example: TCPDF ERROR: Some data has already been output, can't send PDF file
// Clean any content of the output buffer
ob_end_clean();
// Send the PDF !
$pdf->Output('example_006.pdf', 'I');