pdf download IE bug. weird ActiveX problem I guess.

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
jmut
Forum Regular
Posts: 945
Joined: Tue Jul 05, 2005 3:54 am
Location: Sofia, Bulgaria
Contact:

pdf download IE bug. weird ActiveX problem I guess.

Post by jmut »

Hi,
this is little hard to explain and I am making stab in the dark here.

There are two systems... test and live (only difference being live is https enabled).

I provide a link like...

d.php?var1=somevar&action=getpdf

.. to provide pdf file for download.

On test everything downloads smoothly.

On LIVE Problem:
When trying to download on live system IE explorer crashes with

Code: Select all

Internet Explorer cannot download ....somevaraction=getpdf        (hence removing &..ignoring second var in query string.)
Internet Explorer was not able to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later.
I found on this site that such bug exists "Bug 3a:"
http://www.swiftview.com/tech/tests/ie_bugs.htm

I tried putting .pdf at the end of get url...to fake IE MIME in downloading .pdf file....
Now I am thinking as described in bug to not pass second var..but one var through _GET only.
But if this is really the problem. I would guess it should not work on test also...but it does work.

Only difference I see between systems is that live is https.

These are the headers for the file.

Code: Select all

$pdf = 'filename.pdf';
                	header('Content-type: application/pdf');
                	header('Pragma: no-cache'); //HTTP 1.0
                	header('Cache-Control: private, must-revalidate, post-check=0, pre-check=0');
                	header('Content-Length: ' . filesize($pdf));
                	header('Content-Description: something');
                	header('Content-Disposition: inline; filename="save.pdf"');
                	echo file_get_contents($pdf);

If anyone has ever experience such problem or know a possible solution... Please let me know.
P.S. on Opera/FF/Konqueror everything is smoothly running.
Post Reply