Fix for: TCPDF ERROR: Some data has already been output, can’t send PDF file
-
Hello! On one of our websites, the PDF export of a job posting didn’t work.
Notice: Undefined variable: content in /SERVERPATH/wp-content/plugins/job-postings/include/class-pdf-export.php on line 406
TCPDF ERROR: Some data has already been output, can’t send PDF fileWe found a fix (mentioned here: https://stackoverflow.com/questions/16011050/tcpdf-error-some-data-has-already-been-output-cant-send-pdf-file) and would like to share it.
Fix:
/wp-content/plugins/job-postings/include/class-pdf-export.pdf~ Line 302:
$epdf = $pdf->Output($file_name , 'D');
Change to:
ob_end_clean();
$epdf = $pdf->Output($file_name , 'D');
Could this be added to the plugin by default?
- The topic ‘Fix for: TCPDF ERROR: Some data has already been output, can’t send PDF file’ is closed to new replies.