TCPDF error

TCPDF error

ved sam salt -
Antal besvarelser: 5

 

I am using moodle 2.2 and i want to fetch some useful information of user on certificate

when i wrote this code to fetch

certificate_print_text($pdf, $x+120, $y+30, 'C', 'Helvetica', '', 14, $questionnaire->view_response($rid));

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

and certificate saved without fetching that information

Gennemsnitsbedømmelse: -
I svar til sam salt

Re: TCPDF error

ved sam salt -

I had wrote my own code there for fetching data.

I svar til sam salt

Re: TCPDF error

ved Mark Nelson -
Billede af Core developers Billede af Documentation writers Billede af Particularly helpful Moodlers Billede af Peer reviewers Billede af Plugin developers Billede af Testers

Hi Sam,

Some information is being output to the browser window before the pdf is sent to the browser to be downloaded. I suspect you have an echo statement or the equivalent in your certificate type folder, or the view.php file.

More code would be helpful.

Regards,

Mark

I svar til Mark Nelson

Re: TCPDF error

ved Mairsile Hourihane -

Hi Mark,

I am having the same problem on a M2.5.

The certificate was working fine when I was last adding content, but today I'm getting the TDPDF Error: some data has already been output.

Have you any suggestions as to why this error should occur on a site that has had no code changes.

Moodle version 2.5.4+, Firefox & Chrome browsers on Windows and Android.

Thanks,

Mairsile Hourihane