473,397 Members | 1,972 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

IE6 and sending PDF

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

Jul 17 '05 #1
9 7670
Gregor Rot wrote:
Hi, i am sending a pdf file to IE6 and just want the browser to open it
directly without asking anything.
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.
[...] Now, according to documentation, if i remove the Content-
disposition, the browser should open it directly in the frame.


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
Jul 17 '05 #2
John Dunlop wrote:
Gregor Rot wrote:

Hi, i am sending a pdf file to IE6 and just want the browser to open it
directly without asking anything.

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.

[...] Now, according to documentation, if i remove the Content-
disposition, the browser should open it directly in the frame.

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.

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.
Content-type: application/pdf
Content-length: size_of_file
Content-Disposition: attachment; filename=somefile.pdf


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?

Jul 17 '05 #3
Gregor Rot <za*********@yahoo.com> wrote in message news:<dh*******************@news.siol.net>...
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?

Content-Disposition: inline; filename=somefile.pdf tnx,
Greg

Jul 17 '05 #4
Farhan wrote:
Gregor Rot <za*********@yahoo.com> wrote in message news:<dh*******************@news.siol.net>...
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?

Content-Disposition: inline; filename=somefile.pdf
tnx,
Greg
I have resolved the problem:
Content-Disposition: attachment; filename=somefile.pdf
By changing the upper line to:
Content-Disposition: filename=somefile.pdf


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

Greg

Jul 17 '05 #5
Gregor Rot wrote:
I have resolved the problem:


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


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
Jul 17 '05 #6
John Dunlop wrote:
That is a malformed Content-Disposition header according to RFC1806
sec. 2 (and RFC1506, sec. 4).

-----------------^^^^
That should be RFC1521. Oops.

--
Jock
Jul 17 '05 #7
John Dunlop wrote:
Gregor Rot wrote:

I have resolved the problem:

The real problem was with your "browser", not how you serve the file.
Configure it to behave as you wish.

>>> Content-Disposition: filename=somefile.pdf

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


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

Jul 17 '05 #8
Gregor Rot wrote:
<snip>
Seeing your knowledge of the RFCs and all I would be very happy if you
could write the correct disposition for the desidered behaviour

<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.
Jul 17 '05 #9
Agelmar wrote:
Gregor Rot wrote:
<snip>
Seeing your knowledge of the RFCs and all I would be very happy if you
could write the correct disposition for the desidered behaviour


<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.

Uh sorry, i see, it was mentioned in the first post, not many times,
tnx. It works.

Greg

Jul 17 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: coder_1024 | last post by:
I'm trying to send a packet of binary data to a UDP server. If I send a text string, it works fine. If I attempt to send binary data, it sends a UDP packet with 0 bytes of data (just the...
0
by: praba kar | last post by:
Dear All, I have doubt regarding mail sending smtplib module. The below code is I used to send a mail. ########################################## import email.Message import email.Utils...
10
by: Stuart Mueller | last post by:
I have an exchange server, that I sometimes use to perform mail shots to clients on our database, these can be upwards of 1000 at a time. As we don't want different clients to see who we are...
3
by: Robert A. van Ginkel | last post by:
Hello Fellow Developer, I use the System.Net.Sockets to send/receive data (no tcpclient/tcplistener), I made a receivethread in my wrapper, the receivethread loops/sleeps while waiting for data...
4
by: yaron | last post by:
Hi, I have a problem when sending data over TCP socket from c# client to java server. the connection established ok, but i can't send data from c# client to java server. it's work ok with...
7
by: Lau | last post by:
I need to send 1000 emails from an asp.net website. Normally I would use System.Web.Mail.MailMessage() to send thru an SMTP server. But the large amount of emails results in a timeout. My server...
3
by: Ant | last post by:
Hi, I'm using the MailMessage & smtpMail classes in System.Web.Mail to send mail, however it's not sending any emails. I'm using it on a Windows 2003 server. The simplest way to use this is...
0
by: remya1000 | last post by:
by using FTP i can send files to server using vb.net. if the file is big, then it will take some time to complete the sending process to server.or if we were sending 3-4 files to the server one by...
9
by: JoeP | last post by:
Hi All, How can I find the reason for such an error: Failure sending mail. Some Code... oMailMessage.IsBodyHtml = False oMailMessage.Body = cEmailBody Dim oSMTP As New SmtpClient...
4
by: =?Utf-8?B?R3V5IENvaGVu?= | last post by:
Hi all I use: Dim message As New MailMessage(txtTo.Text, txtFrom.Text, txtSubject.Text, txtBody.Text) Dim emailClient As New SmtpClient(txtSMTPServer.Text) emailClient.Send(message) And its...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.