TCPDF: removed ob_get_contents() [was added for debugging]

This commit is contained in:
Adnan
2010-08-20 12:13:30 +05:00
parent 13abea596a
commit 8a827e5261

View File

@@ -2996,7 +2996,7 @@ if(!class_exists('TCPDF', false)) {
case 'D': {
//Download file
if(ob_get_contents()) {
$this->Error(ob_get_contents().'Some data has already been output, can\'t send PDF file');
$this->Error('Some data has already been output, can\'t send PDF file');
}
if(isset($_SERVER['HTTP_USER_AGENT']) && strpos($_SERVER['HTTP_USER_AGENT'],'MSIE')) {
@@ -3007,6 +3007,7 @@ if(!class_exists('TCPDF', false)) {
if(headers_sent()) {
$this->Error('Some data has already been output to browser, can\'t send PDF file');
}
header('Content-Type: application/pdf');
header('Content-Length: '.strlen($this->buffer));
header('Content-disposition: attachment; filename="'.$name.'"');
echo $this->buffer;