httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lauralyn Ninow <>
Subject RE: [users@httpd] RE: IE6+Adobe Reader 5 will not open a PDF File
Date Wed, 09 Apr 2003 15:58:34 GMT
Comments below.  =)


> -----Original Message-----
> From: Andrus []
> Sent: Wednesday, April 09, 2003 6:45 AM
> To:
> Subject: [users@httpd] RE: IE6+Adobe Reader 5 will not open a PDF File
> As I wrote earlier, I have an application using my custom web 
> server which
> does exactly which I want:
> display PDF files in IE 6.  It does to use CGI.

OK. you're opening PDFS using the plugin in the browser.  That is browser
specific. and using CGI verses something other technology doesn't matter -
as long as the headers are correct. Using PHP? - HTTP Protocol

> My web server does not use Location:, it returns bata directly to the
> connection.

I don't use the Location header either. How are you writing the data to the

> However, exactly the same PDF file is not displayed from 
> Apache server.

Are you still using IE6 at this point? what errors are you getting? Or are
you getting a blank or partial page? - If so, That happened to me in two
cases: 1) when the data wasn't written to the broswer in binary. And 2) when
not all of the data was sent. Either way, I had to use a sniffer to find
that out.

> According to a
> if I use Content-disposition: Inline, then IE 6 displays PDF 
> INSIDE browser
> window

I looked at the article above titled "Redmond's Gray Skies of Summer" -
there is now mention of Content-disposition. Did you give the right URL?
Watch out for frames, the URL rarely matches which article you're actually

> If PDF file does not start with %PDF-  , Acrobat reader displays error
> message about this.
> If PDF file is corrupted, Acrobat reader displays error message also.
> What sniffer to use in Windows ? or is it possible to log packets from
> Apache side ?

I used Ethereal (sniffer program) It's logs network traffic, it doesn't
matter what the web server is. And I believe it is platform-independent.

> Opening the created pdf file from c: dirive displays it in 
> reader without
> problems.
> I think Apache adds some headers which confuses IE or Reader.
> Any help ?
> >From: Lauralyn Ninow <>
> >I don't know what to say, other than I don't think POST/GET 
> matters. As
> long
> >as you are writting your headers and data correctly.  Look 
> at the specs for
> >HTTP and get a sniffer to see the data (the contents of the 
> PDF file) you
> >are sending.  You may be sending wrong data or something.  A PDF file
> should
> >start with %PDF-1.4% and end with a %%EOF
> >The only way I could write the data is by writing the file 
> out in binary
> >chunks to the browser. The speed is what you'd expect for 
> large files, so
> >for your CGI program to do this really wouldn't be a big deal.
> >What are you trying to accomplish?  are you wanting the 
> person to download
> >the PDF file? or do you wnat the PDF file to open in the 
> person's browser?
> >You can't really control this unless you pass an uncommon 
> mime-type. Most
> >browsers will prompt to download an unknown mime-type. But 
> for PDF files,
> >you can bet that people have that configured to open in 
> their browsers.
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP 
> Server Project.
> See <URL:> for more info.
> To unsubscribe, e-mail:
>    "   from the digest:
> For additional commands, e-mail:

View raw message