-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TCPDF ERROR: Some data has already been output, can't send PDF file #4147
Comments
Try with debug mod disabled. |
debug was disabled. (you mean the bug icon in the right uper corner?) |
Try with debug_mode disabled (always) and all plugins disabled. |
same result. here some sys infos
|
I cannot reproduce on 9.3 (tested on demo website and local). |
hi "trasher" i don't want you to reproduce this error and i don't need any help. i just recommend to add an ob_end_clean(); before every $pdf->Output('glpi.pdf', 'I'); in any file where tcpdf is used by glpi , that's all. ob_end_clean cleans the output buffer . So if some messages are in this buffer , tcpdf creates this error message ... ob_end_clean(); $pdf->Output('glpi.pdf', 'I'); instead of a simple $pdf->Output('glpi.pdf', 'I'); see http://php.net/manual/en/function.ob-end-clean.php and https://stackoverflow.com/questions/16011050/tcpdf-error-some-data-has-already-been-output-cant-send-pdf-file for some reasons under centos 7 and glpi 9.2 it's not working without ob_end_clean . |
Thats work for me ! Thanks |
Hi.
After update to 9.2 with new remi php i got the following error when i tried to save something as pdf
"TCPDF ERROR: Some data has already been output, can't send PDF file"
No PDF was created, just this error message.
found the solution here
https://stackoverflow.com/questions/16011050/tcpdf-error-some-data-has-already-been-output-cant-send-pdf-file
with a grep i found
... and i added a line with "ob_end_clean();" before the lines with "pdf->output"
after adding this the problem was gone .
PS: just as an info ... the same i did with the glpi-pdf plugin. Maybe you can forward this to "remi" and "yllen" ... because this glpi-pdf plugin is not on github ... :-(
The text was updated successfully, but these errors were encountered: