LinuxQuestions.org
Visit Jeremy's Blog.
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?VE[#??2??e?h5?0L' !azh4??@??.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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration