TCPDF ERROR: Some data has already been output, can't send PDF file

QuestionsTCPDF ERROR: Some data has already been output, can't send PDF file
varun asked 11 years ago

TCPDF ERROR: Some data has already been output, can't send PDF file

i am trying to export to pdf, why this error appears?

And also i tried to export to excel,where i am getting special characters and bad alignment.

Can i get the reasons and resolving solutions?

3 Answers
Abu Ghufran answered 11 years ago

Hello,

This Error occurs when you have something echo'd before $g->render() function call.
It may be white space OR php warning. Please recheck by viewing source of error page.

You might need version update for excel fix. I'll be emailing you v1.5

Thanks.

varun answered 11 years ago

Thnks, i got the error and working fine,but still i'm wondering to know and let others do know.

i have,
$bd = mysql_connect($mysql_hostname, $mysql_user, $mysql_password) or die("Oops some thing went wrong in connection");

mysql_select_db($mysql_database, $bd) or die("Oops some thing went wrong in database");

as it is in any other configuration page,why is it not rendering anlong with this 'die' statements

Abu Ghufran answered 11 years ago

May be, this is because the lib internally uses ob_start() and ob_get_clean() functions, which prevent from echo on some cases.

Your Answer

9 + 8 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?