IE8 doesn't show open/save dialog when opening PDF

I have written Java application that, when user click on the button, it 
opens new location in the same window in which it shows new HTML page 
and opens new popup window using window.open() JavaScript code. In the 
popup window Java outputs PDF using following headers:

ContentType - application/pdf
ContentLength - 1000
Content-Disposition - attachment; filename=My.pdf

With above settings IE8 doesn't show open/save dialog for my PDF. Above 
code works fine with IE6, IE7 and Firefox. If I change "attachment" to 
"inline", then IE8 shows PDF in the popup window, but this is not what I 
want. Tested on two PCs and with Acrobat Reader and Foxit PDF clients.
0
Milan
3/23/2010 9:26:12 AM
internetexplorer.general 1684 articles. 0 followers. Follow

7 Replies
3898 Views

Similar Articles

[PageSpeed] 2

Milan <user@exampl.net> wrote:
>
> I have written Java application that, when user click on the button, it 
> opens new location in the same window in which it shows new HTML page 
> and opens new popup window using window.open() JavaScript code. In the 
> popup window Java outputs PDF using following headers:
>
> ContentType - application/pdf
> ContentLength - 1000
> Content-Disposition - attachment; filename=My.pdf
>
> With above settings IE8 doesn't show open/save dialog for my PDF. Above 
> code works fine with IE6, IE7 and Firefox. If I change "attachment" to 
> "inline", then IE8 shows PDF in the popup window, but this is not what I 
> want. Tested on two PCs and with Acrobat Reader and Foxit PDF clients.

I tested this on IE8 and it works fine.
(without the fake contentLength)

So it probably is some setting that you changed.
0
Rob
3/23/2010 10:34:37 AM
Rob, very kind from you but...

>
> I tested this on IE8 and it works fine.
> (without the fake contentLength)

it doesn't work... I'll try to attach here sample tomcat/java project in 
my next post.
0
Milan
3/23/2010 12:08:17 PM
Milan <user@exampl.net> wrote:
>
> Rob, very kind from you but...
>
>>
>> I tested this on IE8 and it works fine.
>> (without the fake contentLength)
>
> it doesn't work... I'll try to attach here sample tomcat/java project in 
> my next post.

I have a php script on my website that, for each .pdf file, allows the user
the choice to just open it or to offer it for download.  In that case
these headers are added:

    header('Content-Type: application/pdf');
    header('Content-disposition: attachment; filename="'.$file.'"');
    header('Last-Modified: '.gmdate('D, d M Y H:i:s',filemtime($file)).' GMT');

It works fine.  Also with IE8.  I get a popup that allows me to open,
save, or cancel.
When using the other option, I omit the Content-disposition header and 
it opens in the Adobe Reader plugin without asking questions.

No problem in IE8 apparently.  Maybe a problem in your site or in your
settings of IE8.
0
Rob
3/23/2010 12:19:10 PM
See replies to your identical post in IE forum.
http://social.answers.microsoft.com/Forums/en-US/InternetExplorer/threads 

Milan wrote:
> I have written Java application that, when user click on the button, it
> opens new location in the same window in which it shows new HTML page
> and opens new popup window using window.open() JavaScript code. In the
> popup window Java outputs PDF using following headers:
> 
> ContentType - application/pdf
> ContentLength - 1000
> Content-Disposition - attachment; filename=My.pdf
> 
> With above settings IE8 doesn't show open/save dialog for my PDF. Above
> code works fine with IE6, IE7 and Firefox. If I change "attachment" to
> "inline", then IE8 shows PDF in the popup window, but this is not what I
> want. Tested on two PCs and with Acrobat Reader and Foxit PDF clients.
0
PA
3/23/2010 10:32:22 PM
On 23.3.2010 23:32, PA Bear [MS MVP] wrote:
> See replies to your identical post in IE forum.
> http://social.answers.microsoft.com/Forums/en-US/InternetExplorer/threads

I can't find any replies there. I have posted this on Microsoft Connect 
with 0 comments, 0 workarounds and 0 replies, so far. Can you please 
give me a link to those replies? I can't find them.
0
Milan
3/24/2010 9:50:13 AM
On 23.3.2010 23:32, PA Bear [MS MVP] wrote:
> See replies to your identical post in IE forum.
> http://social.answers.microsoft.com/Forums/en-US/InternetExplorer/threads

This is my MS Connect link:

https://connect.microsoft.com/IE/feedback/details/543929/ie8-doesnt-show-pdf
0
Milan
3/24/2010 9:56:47 AM
Developer-specific resources include:

MSDN IE Development Forum (post such questions here instead)
http://social.msdn.microsoft.com/Forums/en-US/iewebdevelopment/threads

Tip: When posting in Developer forums, always include a link to your web 
site or test pages in your first post.

IE Developer Center
http://msdn.microsoft.com/en-us/ie/default.aspx

Learn IE8
http://msdn.microsoft.com/en-us/ie/aa740473.aspx

HTML and DHTML Overviews and Tutorials
http://msdn.microsoft.com/en-us/library/ms537623.aspx and

Cascading Style Sheets (CSS)
http://msdn2.microsoft.com/en-us/ie/aa740476.aspx

Expression Web SuperPreview for Internet Explorer (free, stand-alone visual 
debugging tool for IE6, IE7, and IE8)
http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=8e6ac106-525d-45d0-84db-dccff3fae677

Expression Web SuperPreview Release Notes
http://www.microsoft.com/expression/products/Web_SuperPreviewReleaseNotes.aspx

Validators:
http://validator.w3.org/
http://jigsaw.w3.org/css-validator/


Milan wrote:
> On 23.3.2010 23:32, PA Bear [MS MVP] wrote:
>> See replies to your identical post in IE forum.
>> http://social.answers.microsoft.com/Forums/en-US/InternetExplorer/threads
>
> This is my MS Connect link:
>
> https://connect.microsoft.com/IE/feedback/details/543929/ie8-doesnt-show-pdf 

0
PA
3/24/2010 2:17:25 PM
Reply:

Similar Artilces:

IE8 Developer
Will there be any updates (more features) with the IE8 Developer tool coming soon? Firebug just released their updates and some of their newer features are very handy (i.e. the new Quick Info) using FireFox. --MJ ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pan...

emails are being deleted after I open them
If I open an email and want to respond at a later time; when I close it, it disappears. It is not in my deleted files. This is something new in the last week or so. This is a multi-part message in MIME format. ------=_NextPart_000_00E3_01C7631F.5FDF3C70 Content-Type: text/plain; charset="Utf-8" Content-Transfer-Encoding: quoted-printable Check your VIEW for a FILTERED VIEW. Select VIEW on your Outlook menu. Select ARRANGE BY Select CURRENT VIEW Then be sure that the MESSAGES view is selected. Did this help? Nikki Peterson "Pat" <Pat@discussions.microsoft.com&g...

2003 doen't show up in exchange 5.5 site
Our new 2003 server has crashed three times due to what we believe is hardware. So no problem right. I just build another 2003 server and move users to it instead. So I build it and move connecters and I am just about ready To go. I go into exchange 5.5 admin and it only shows the DSA service. OK so I must have done something wrong. I go to add the SRS back to the old 2003 server and it fails with an error that the distinguished name already exists. I find a white paper that says just remove it from the site. Ouch I have 100 users on it so that isn’t going to happen. So I build another ...

Saving a shared worksheet
HI, When a worksheet is setup as shared on the network, and two users have opened this file concurrently, and both are editing the file, who s version will get finally saved? Will the data saved by the user who closes first be lost when the second user saves? Could you someone enlighten on what really a shared workbook means? Thanks Ramesh The whole point of shared workbooks is to save the changes of all simultaneous users. When two user edit the same cell a 'Resolve Conflicts' dialog will appear. You should search in Excel help on 'shared workbook' for more on ...

Show in Groups
Hi, how do I disable "show in Groups" globally and forever. Now I have to set it after every restart of outlook...:( why? Thanx! -- roN www.rideon.ch oh, i thought, i have to reset it after every restart, i wanna disable it! Ron Eggler wrote: > Hi, > > how do I disable "show in Groups" globally and forever. Now I have to > set it after every restart of outlook...:( why? > Thanx! -- roN www.rideon.ch oh yeahj, i forgot to say: i'm using outlook 2003... Ron Eggler wrote: > oh, i thought, i have to reset it after every restart, i wanna > dis...

Trouble opening .xls files
I have heaps of .xls files but now Excel has difficulty opening files that have spaces in the file name/path. Example: - If I try to open an xls with the path C:\documents and settings\f arthur\my documents\spread sheet.xls I start recieving the following: - can't find file name "C:\documents" I then retry and recieve can't find filename "C:\documents and" it does this all the way through the spaces till it gets to the file extension .xls and only then opens it. I can't think of anything more to try and have many files to rename without spaces :o( d...

Others receive Path Error when opening a Spread Sheet that is Update Data on Open"
I have excel doc that is automatically updating on open from an Access DB. All are shared on a network. It works fine for me but other users get an invalid path error that refers to C:\... (etc) . Where is the defulet that Excel automatically extracts this from because it is totally eronious Additionally they get a Jet path dialog box that is listing an eronious path too. AKK.. Help! --- Message posted from http://www.ExcelForum.com/ ...

Need HELP with Custom Dialog query
I seriously need some help. This problem has taken up way to much of my time. I've spent hours searching through example code and trying to change it so it works for me but nothing does. What I have is a small database where I need to allow users to search for repair shops. I have a 3 parameter query set up so the user can enter any or all of a shop name, address, and or zip code to pull up a shop. My problem is I would like to combine all 3 parameters onto 1 custom dialog box instead of 3. Could someone please write this query and code for me? The first time I opened Access was when I sta...

Opening mutiple folders...
Is it possible to open mutiple folders at one time in seperate windows?... Example: I would like to open my Inbox but also like to open and display Sent Messages at the same time time... Not directly. But you can go to Edit, Find Message (Ctrl+Shift+F) and find messages in another folder. You can choose criteria that would find all messages. -- Mike - http://TechHelp.Santovec.us "hsnp" <hsnp@discussions.microsoft.com> wrote in message news:D13CBE0D-366D-4CFD-A418-1F01BBC7D33C@microsoft.com... > Is it possible to open mutiple folders at one time...

running Flash using IE8 on x64 system
I'm about to do a clean install of my system (Dell Precision T5400 64-bit system with 2 300GB drives setup in a RAID 1 mirror and 8GB of memory). I will running XP Pro x64 Edition with Service Pack 2. By default, IE6 or IE7 will be installed after I finish re-installing my system. I am going to immediately get all the windows updates, which will install IE8 on my system. Does the windows update install both the x32 (Program Files x86 directory) and x64 (Program Files directory) version of IE8? If that is correct, then I can just create a shortcut to IE8 in the Program...

M'03 not showing 2004 entries
I am creating transactions that are dated 2004. They show in the reports... but not in the account register (checking in this case) My balance has gone totaly whack... off by thousands. anybody else gettingthis with Money 2003? Something very similiar is happening to me. All my scheduled bills are showing up in the register, BUT my scheduled deposits are not. This of course really screws up the cash flow. This is only for transactions scheduled for 2004. What am I missing? There are no end dates to the scheduled deposits. >-----Original Message----- >I am creating tra...

Date format Workbooks Open
I have an application which saves the output to .xls format. If I open the file from Excel, I get the Text Import Wizard. There is a date/time column in format dd/mm/yyyy hh:mm However, If I use Application.Workbooks.Open to open the file, the date/time column is in format dd/mm/yy hh:mm ie the yyyy is shortened to 2 digits. Manually clicking into a cell and pressing enter updates the cell, as does Text to Columns. I have recorded some code to use Data>Text to Columns, but running the code does nothing. If the dates are in column L, the code is as follows: ...

Chart problem: values in column A doen't show on x-axis
The data in column A in the table I want to use for a chart contain numeric values: 2000 - 2001 - 2002 - ... In the chart these don't show as labels for the x-axis, but as a serie of data in the chart. Any way around this without changing all the values in coumn A int text -- digica ----------------------------------------------------------------------- digicat's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1492 View this thread: http://www.excelforum.com/showthread.php?threadid=49945 ...

Creating email that arrives already open.
I am trying to create an email with graphics/pics. and charts that when sent will arrive already opened, like the page of a magazine. Not have the receipent have to open a file to see the message. If I need a special program to do this, what is the name? -- Ted In Outlook, Insert - Picture - From File will do it. "Ted" <Ted@discussions.microsoft.com> wrote in message news:BF5694E7-54E1-4022-93D3-F6EDBEC39102@microsoft.com... > I am trying to create an email with graphics/pics. and charts that when sent > will arrive already opened, like the page of a magazine. ...

HTML mail merge emails show images as attachments
When I mail merge a Word document which has images within it the resultant emails all have the images as mutiple attachments. How can i stop this occuring? Thanks in advance ...

Excel spreadsheet opening in IE8 instead of Excel 2003
I have an excel spreadsheet on the network but opened through Sharepoint Small Business Server 2003. All the PCs on the network correctly open the XLS file in Excel 2003 except for this one particular PC that insists on opening it in IE8. This has happened before but after a few days solved itself - so we never got to the bottom of it. I have confirmed that XLS files are associated with Excel but it is still happening Anybody any thoughts. Thanks BJ I've never used any version of SharePoint, but this is what I'd try. (I use WinXP, so it may be different for the...

Outlook 2007 contact details do not show up in calendar
When I put birthdays/anniversaries into a contact it does not show up in my calendar. Is it putting it into a different calendar that is not active or displayed? -- pms1228 http://forums.slipstick.com Go to the folder list (Ctrl+6) - how many calendars do you have? -- Diane Poremsky [MVP - Outlook] Outlook Tips: http://www.outlook-tips.net/ Outlook & Exchange Solutions Center: http://www.slipstick.com/ Outlook Tips by email: mailto:dailytips-subscribe-request@lists.outlooktips.net EMO - a weekly newsletter about Outlook and Exchange: mailto:EMO-NEWSLETTER-SU...

IE8 or IE8 provided by Yahoo?
I have ATT DSL and have been using IE8 since it was available. Recently I had to uninstall/reinstall it and SP3 for a problem and when I reinstalled Explorer I used "IE8 provided by Yahoo" After making my default browser IE I noticed that it is still provided by Yahoo. I think it is a little less stable, or slower maybe, but I don't want to remove it and install IE8 just on a whim. It was not fun. Does anyone know what the diffierence in their operations are, and what difference it will make? Thanks. Dell Dimension 8400 32 bit Win XP NIS 2010 -- Randu ...

How to show phonetic in Richedit
Hi there, I have a MFC application, and I need to show phonetic in Richedit. I know the font named lucida sans unicode can show phonetic, Although I set CHARFORMAT for richedit, I still cannot show phonetic in richedit correctly. Please help me! Thanks a lot! If you are talking about the latin letters with the accent marks then you will have to change your keyboard layout so that it types those chars, or cut and paste it into the edit control. AliR. "Hooyoo" <zhao_huyong@126.com> wrote in message news:1160547750.712079.314600@m73g2000cwd.googlegroups.com... > Hi there, &...

Outlook Embedded Images don't show, despite unclicking "Don't Show
Dear Experts, I'm running Outlook 2007 on Windows XP. Outlook won't show embedded images (like in emailed newsletters). I unclicked the "Don't Download pictures automatically in HTML email messages or RSS items", but it still won't show them. Actually, it will show some of the pictures, but it won't show the graphic/logo items of the newsletters. For all the things it is not showing, there is an empty square/rectangle. Nor will it show attachments in the body. Just a square. If I go to right click on the square, the only option is "copy." ...

Publisher cannot open files from a different version??????
A customer sent me a Publisher file created with Publisher 2000 v6.0. I have Publisher 2000 SP3. Why won't publisher open this file? Is it because I went to the trouble of installing the updates as MS suggested? Thanks for any help Do you have Norton? Disable "script blocking" and in Norton options, misc., disable "Office Plug-in." Disable any other anti-virus software and try opening the file. You could try opening it in safe mode, there is the chance the file is looking for a printer driver. -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps....

Excel doesn't open the file
When I click on an excel file (or even a word doc), excel opens to a gray page. I then have to search for and open the file from the file list. The file associations are set correctly. This has just started recently. It used to open directly to the file I clicked on. Any ideas on how to fix this? Thanks in advance. Steve First, check to make sure the workbook isn't actually open: Window|Arrange|Tiled If it's not visible, then sometimes one of these works: Tools|Options|General|Ignore other applications (uncheck it) --- or --- Close Excel and Windows Start Button|Run excel /u...

"Show Images"
I want to allow images in messages sent by my contacts and safe sender list. How do i do that. Searched this site for "show Images" but nothing related cam up. Snowman Tools - Safety Options - Security tab - center of window, Download Images section, see two checkboxes to use as desired. "Snowman" <Snowman@discussions.microsoft.com> wrote in message news:0BB75264-6CB0-4471-A61E-4E268DEA935F@microsoft.com... > I want to allow images in messages sent by my contacts and safe sender > list. > How do i do that. > > Searched this site f...

Check Workbook name currently opens is correctly
Hi, Codes below try to check every existing workbook's name currently opened is correct and if not, it exit sub After several attempts, it still not able to run and prompts " Subscript out of range" Sub test() Dim y As Long, x As Variant x = Array("AB.xls", "CD.xls", "EF.xls", "GH.xls") For y = LBound(x) To UBound(x) If Workbooks(x(y)).Name = "AB.xls" Then MsgBox Workbooks(x(y)).Name & " not found " Exit Sub ElseIf Workbooks(x(y)).Name = "CD.xls" Then MsgBox Workbooks(x(y)).Name & &quo...

I can't get "continued on page . . " to show up in my text box. .
Know matter what I do, I can't get "continued on page" or "continued from page" to show up in my text box. What am I doing wrong. This is such a simple thing, why isn't it working? So FRUSTRATED!!!!! Publisher 2000 here. Create your pages and links (auto flow from page to page) Highlight text box on page one Select Format, Text frame properties, check the "continued to" and "continued from" You may have to edit them with page n and form page n -- Don Vancouver, USA "jnap" <jnap@discussions.microsoft.com> wrote in me...