LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-29-2003, 10:04 PM   #1
siucorn
LQ Newbie
 
Registered: Aug 2003
Posts: 1

Rep: Reputation: 0
Unhappy IE doesn't load PDF sometimes and prints garbage


I have Apache running on RedHat Linux and have a site that redirect user to different PDF files. However, I SOMETIMES got the PDF file printed on IE instead of loading Acrobat Reader. I am using IE 6 and Acrobat Reader 6. I have been looking for a solution but failed. This is urgent! Please help.

My file:
--------
<?php
$link=$_REQUEST["link"];
$ext = strtolower(stristr($link, '.'));

if (strcmp($ext, '.pdf')==0) {
// We'll be outputting a PDF
header("Content-type: application/pdf");
// The PDF source is in original.pdf
readfile($link);
} else {
echo "<html><head><META HTTP-EQUIV=\"Refresh\" CONTENT=\"1; URL=$link;\"></BODY></HTML>";
}
?>

Garbage that I got from IE
---------------------------------

R /im555 1770 0 R /im556 1772 0 R /im557 1774 0 R /im558 1776 0 R /im559 1778 0 R /im560 1780 0 R /im561 1782 0 R /im562 1784 0 R /im563 1786 0 R /im564 1788 0 R /im565 1790 0 R /im566 1792 0 R /im567 1794 0 R /im568 1796 0 R /im569 1798 0 R --3f5009ae6df7-- HTTP/1.1 206 Partial Content Date: Sat, 30 Aug 2003 02:19:27 GMT Server: Apache/1.3.14 (Unix) (Red-Hat/Linux) mod_jk DAV/1.0.1 PHP/4.2.1 Last-Modified: Fri, 31 May 2002 04:06:26 GMT ETag: "1060e0-24c216-3cf6f6c2" Accept-Ranges: bytes Content-Length: 1567541 Content-Range: bytes 841441-2408981/2408982 Keep-Alive: timeout=15, max=99 Connection: Keep-Alive Content-Type: application/pdf ÇM0? r ¸r8h4?xl;?ºk P4? ?áA ?f* ? a(?a??qL ?l+k_?‡b?æVëE[#??2??eÁÈÀÞí¦?h5ÞÖÖû?0˜L' !aÌzh4??@??.ši_Âe??ÎèXD,(a ˜è0?g!0Gde9RP?ÀÆC?B"?íÕºë??Ûé…¡?µ >Þ¾?ÿ endstream endobj 1428 0 obj 41 endobj 1429 0 obj << /Type /XObject /Subtype /Image /Name /im496 /Filter /CCITTFaxDecode /Width 5102 /Height 51 /BitsPerComponent 1 /ColorSpace /DeviceGray /Length 1428 0 R /DecodeParms << /K -1 /Columns 5102 >> >> stream

................... (many more)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
2Wire Garbage axessterminated Linux - Hardware 3 10-07-2005 11:47 AM
what does garbage collected mean Garda Programming 3 08-25-2005 01:54 AM
Foxit PDF Reader 1.3: A Nice PDF Viewer Cinematography Linux - Software 6 05-03-2005 04:36 PM
How do I unpack pdf.pdf files corbis_demon Linux - General 5 10-29-2004 09:12 PM
xv grab garbage kramtoad Linux - Software 0 08-23-2003 07:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration