Re: Error running output2 pattern [message #4533 is a reply to message #4457] |
Mon, 08 September 2014 12:20 ![Go to previous message Go to previous message](/theme/default/images/up.png) ![Go to next message Go to previous message](/theme/default/images/down.png) |
htManager
Messages: 427 Registered: May 2014
|
Senior Member |
|
|
I still struggle with the problem to output pdf files.
For output2 pattern I have inserted ob_clean(); in line 7588 and it works.
switch($dest) {
case 'I': {
// Send PDF to the standard output
ob_clean();
if (ob_get_contents()) {
$this->Error('Some data has already been output, can\'t send PDF file');
}
Printing output3 pattern doesn't work, so I added var_dump(headers_list()); in line 7598
if (php_sapi_name() != 'cli') {
// send output to a browser
var_dump(headers_list());
header('Content-Type: application/pdf');
I got this array:
array (size=5)
0 => string 'X-Powered-By: PHP/5.4.7' (length=23)
1 => string 'Expires: Thu, 19 Nov 1981 08:52:00 GMT' (length=38)
2 => string 'Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0' (length=77)
3 => string 'Pragma: no-cache' (length=16)
4 => string 'Content-type: text/html' (length=23)
Can this be a problem with the php version 5.4.7?
I run Windows 7, MySQL 5.5.27 in a xampp environment.
Is your development environment the same or different?
[Updated on: Mon, 08 September 2014 12:36] Report message to a moderator
|
|
|