Re: output a PDF, over header(). causes corruption on the file?
| From: | Daniel Schierbeck | Date: | Mon, 04 Oct 2004 11:09:43 +0000 |
| Subject: | Re: output a PDF, over header(). causes corruption on the file? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-198582@lists.php.net to get a copy of this message | ||
Louie Miranda wrote:
Im trying to output a pdf over a browser so i can hide the url link to it. but this one causes corruption. Try this.. http://dev.axishift.com/php/getpdf.php i got this part.. "Note: There is a bug in Microsoft Internet Explorer 4.01 that prevents this from working. There is no workaround. There is also a bug in Microsoft Internet Explorer 5.5 that interferes with this, which can be resolved by upgrading to Service Pack 2 or later. " but im using netscape, and it still has error. here's the basic source for it.. <?php // We'll be outputting a PDF header('Content-type: application/pdf'); // It will be called downloaded.pdf header('Content-Disposition: attachment; filename="downloaded.pdf"'); // The PDF source is in original.pdf readfile('original.pdf'); ?> what other alternatives can you suggest? i need this asap! please help. Are you sure that you don't have any whitespace before or after the PHP tags? Try using exit(); after readfile();