|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #23054 Can not display PDF file on screen using @readfile($pdfFile)
Submitted: 2003-04-04 09:58 UTC Modified: 2003-04-04 10:41 UTC
From: cindylu at jdbarnes dot com Assigned:
Status: Not a bug Package: PDF related
PHP Version: 4.3.0 OS: Linux
Private report: No CVE-ID: None
 [2003-04-04 09:58 UTC] cindylu at jdbarnes dot com
If I create a test.php file with the following code, I put that test.php on the website. the code will show the pdf on the screen. It works ok.
header("Content-Type: application/pdf");

But if I put  these few lines of code in my php, it does not show the pdf file on the screen.
$pdffile = myCreatePDF_function($myHTML);
//I know my pdf file is created, because if I stop here, I can see my pdf file and I can use my test.php to show my pdf file on screen.
//But if I put the code in here. It does not work.
header("Content-Type: application/pdf");

Can anyone tell me why?

Any comments are highly appreciated.



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-04-04 10:41 UTC]
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

This is definately not any bug in PHP. 

PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Mon Jul 13 08:01:25 2020 UTC