TCPDF: removed ob_get_contents() [was added for debugging]
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user