Connecting Tech Pros Worldwide Help | Site Map

IE6 and sending PDF

Gregor Rot
Guest
 
Posts: n/a
#1: Jul 17 '05
Hi, i am sending a pdf file to IE6 and just want the browser to open it
directly without asking anything.

This doesn't work:

Content-type: application/pdf
Content-length: size_of_file
Content-Disposition: attachment; filename=somefile.pdf

then i send the data.

This results in: the browser asking to save or open the file, and it
works fine.

Now, according to documentation, if i remove the Content-disposition,
the browser should open it directly in the frame. Anyone been doing that
with success?

tnx,
Greg

John Dunlop
Guest
 
Posts: n/a
#2: Jul 17 '05

re: IE6 and sending PDF


Gregor Rot wrote:
[color=blue]
> Hi, i am sending a pdf file to IE6 and just want the browser to open it
> directly without asking anything.[/color]

Then configure your sorry excuse for a browser to do that. Try
searching the archives of the microsoft.* hierarchy if you can't
figure it out.
[color=blue]
> [...] Now, according to documentation, if i remove the Content-
> disposition, the browser should open it directly in the frame.[/color]

I sincerely doubt that any documentation would say that. What
documentation are you talking about? The Manual? RFC1806? RFC2616-
conforming software needn't follow Content-Disposition header
suggestions.

You might of course use the inline disposition type (RFC1806, sec.
2.1). That's no guarantee of anything though.

--
Jock
Gregor Rot
Guest
 
Posts: n/a
#3: Jul 17 '05

re: IE6 and sending PDF


John Dunlop wrote:
[color=blue]
> Gregor Rot wrote:
>
>[color=green]
>>Hi, i am sending a pdf file to IE6 and just want the browser to open it
>>directly without asking anything.[/color]
>
>
> Then configure your sorry excuse for a browser to do that. Try
> searching the archives of the microsoft.* hierarchy if you can't
> figure it out.
>
>[color=green]
>>[...] Now, according to documentation, if i remove the Content-
>>disposition, the browser should open it directly in the frame.[/color]
>
>
> I sincerely doubt that any documentation would say that. What
> documentation are you talking about? The Manual? RFC1806? RFC2616-
> conforming software needn't follow Content-Disposition header
> suggestions.
>
> You might of course use the inline disposition type (RFC1806, sec.
> 2.1). That's no guarantee of anything though.
>[/color]
Take it easy - i am correcting myself - without Disposition, the browser
should take the default action (either opening the pdf in a separate
Acrobat instance or loading the ActiveX console inside the browser.
[color=blue][color=green]
>> Content-type: application/pdf
>> Content-length: size_of_file
>> Content-Disposition: attachment; filename=somefile.pdf[/color][/color]

With this code, i get a dialog from IE, "Save", "Open", by clicking Open
the PDF is opened in a new Acrobat instance, i want it to be opened in
the browser. How can i do that?

Farhan
Guest
 
Posts: n/a
#4: Jul 17 '05

re: IE6 and sending PDF


Gregor Rot <zara4tustra@yahoo.com> wrote in message news:<dhWNb.1618$%x4.280409@news.siol.net>...[color=blue]
> Hi, i am sending a pdf file to IE6 and just want the browser to open it
> directly without asking anything.
>
> This doesn't work:
>
> Content-type: application/pdf
> Content-length: size_of_file
> Content-Disposition: attachment; filename=somefile.pdf
>
> then i send the data.
>
> This results in: the browser asking to save or open the file, and it
> works fine.
>
> Now, according to documentation, if i remove the Content-disposition,
> the browser should open it directly in the frame. Anyone been doing that
> with success?
>[/color]

Content-Disposition: inline; filename=somefile.pdf[color=blue]
> tnx,
> Greg[/color]
Gregor Rot
Guest
 
Posts: n/a
#5: Jul 17 '05

re: IE6 and sending PDF


Farhan wrote:
[color=blue]
> Gregor Rot <zara4tustra@yahoo.com> wrote in message news:<dhWNb.1618$%x4.280409@news.siol.net>...
>[color=green]
>>Hi, i am sending a pdf file to IE6 and just want the browser to open it
>>directly without asking anything.
>>
>>This doesn't work:
>>
>>Content-type: application/pdf
>>Content-length: size_of_file
>>Content-Disposition: attachment; filename=somefile.pdf
>>
>>then i send the data.
>>
>>This results in: the browser asking to save or open the file, and it
>>works fine.
>>
>>Now, according to documentation, if i remove the Content-disposition,
>>the browser should open it directly in the frame. Anyone been doing that
>>with success?
>>[/color]
>
>
> Content-Disposition: inline; filename=somefile.pdf
>[color=green]
>>tnx,
>>Greg[/color][/color]

I have resolved the problem:
[color=blue][color=green][color=darkred]
>>> Content-Disposition: attachment; filename=somefile.pdf[/color][/color][/color]

By changing the upper line to:
[color=blue][color=green][color=darkred]
>>> Content-Disposition: filename=somefile.pdf[/color][/color][/color]

(omitting the "attachment"), IE takes the default behaviour and opens
the PDF within the browser (loading the ActiveX of Acrobat).

Greg

John Dunlop
Guest
 
Posts: n/a
#6: Jul 17 '05

re: IE6 and sending PDF


Gregor Rot wrote:
[color=blue]
> I have resolved the problem:[/color]

The real problem was with your "browser", not how you serve the file.
Configure it to behave as you wish.
[color=blue][color=green][color=darkred]
> >>> Content-Disposition: filename=somefile.pdf[/color][/color][/color]

That is a malformed Content-Disposition header according to RFC1806
sec. 2 (and RFC1506, sec. 4). A disposition type, or extension-token
is required.

--
Jock
John Dunlop
Guest
 
Posts: n/a
#7: Jul 17 '05

re: IE6 and sending PDF


John Dunlop wrote:
[color=blue]
> That is a malformed Content-Disposition header according to RFC1806
> sec. 2 (and RFC1506, sec. 4).[/color]
-----------------^^^^
That should be RFC1521. Oops.

--
Jock
Gregor Rot
Guest
 
Posts: n/a
#8: Jul 17 '05

re: IE6 and sending PDF


John Dunlop wrote:
[color=blue]
> Gregor Rot wrote:
>
>[color=green]
>>I have resolved the problem:[/color]
>
>
> The real problem was with your "browser", not how you serve the file.
> Configure it to behave as you wish.
>
>[color=green][color=darkred]
>> >>> Content-Disposition: filename=somefile.pdf[/color][/color]
>
>
> That is a malformed Content-Disposition header according to RFC1806
> sec. 2 (and RFC1506, sec. 4). A disposition type, or extension-token
> is required.
>[/color]

Well you are wrong somewhere, because if i point my browser to a regular
pdf file on a site, IE opens it within the browser.

If i serve the file over the described php program, i get a dialog
(Open, Save, etc, and Open opens a new Acrobat instance), all that
assuming: "Content-Disposition: attachment; filename=somefile.pdf"
^^^^^^^^^^^

So i don't have any problem with my browser setup, it's a disposition
problem. If "attachment" is written, the browser treats the data as "an
attachment", and automatically offers the dialog Open, Save, etc...

Seeing your knowledge of the RFCs and all I would be very happy if you
could write the correct disposition for the desidered behaviour (sending
a pdf, and making IE behave like receiving a regular pdf file, opening
it within the browser - this is the default IE setup after Acrobat
Reader is installed = an ActiveX control is installed and opened
automatically after clicking on a pdf file on a site, opening the file
in the ActiveX control, loaded in the browser).

tnx,
Greg

Agelmar
Guest
 
Posts: n/a
#9: Jul 17 '05

re: IE6 and sending PDF


Gregor Rot wrote:
<snip>[color=blue]
> Seeing your knowledge of the RFCs and all I would be very happy if you
> could write the correct disposition for the desidered behaviour[/color]
<snip>

Can you not read? He's already posted it 5 times in this thread.
Content-Disposition: inline; filename=somefile.pdf

you cannot just say content-disposition: filename=something, you have to
specify thedisposition! inline is what you want, and he posted that multiple
times.


Gregor Rot
Guest
 
Posts: n/a
#10: Jul 17 '05

re: IE6 and sending PDF


Agelmar wrote:
[color=blue]
> Gregor Rot wrote:
> <snip>
>[color=green]
>>Seeing your knowledge of the RFCs and all I would be very happy if you
>>could write the correct disposition for the desidered behaviour[/color]
>
> <snip>
>
> Can you not read? He's already posted it 5 times in this thread.
> Content-Disposition: inline; filename=somefile.pdf
>
> you cannot just say content-disposition: filename=something, you have to
> specify thedisposition! inline is what you want, and he posted that multiple
> times.
>
>[/color]
Uh sorry, i see, it was mentioned in the first post, not many times,
tnx. It works.

Greg

Closed Thread