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
|
|
|
|
Reply
|
Milan
|
3/23/2010 9:26:12 AM |
|
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
|
|
|
|
Reply
|
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
|
|
|
|
Reply
|
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
|
|
|
|
Reply
|
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
|
|
|
|
Reply
|
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
|
|
|
|
Reply
|
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
|
|
|
|
Reply
|
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
|
|
|
|
Reply
|
PA
|
3/24/2010 2:17:25 PM
|
|
|
7 Replies
2145 Views
(page loaded in 0.256 seconds)
|