You need to add in some IE specific hacks to get IE to show the content using the acrobat plugin. One issue is that IE will send the request 3 times, and you need to determine which you should respond to with the actual pdf content.

In the servlet, check the user-agent. If it's 'contype', then just sent the content type of the response to application/pdf and return immediately. Also, check if the referrer is not null, and treat it the same way as the contype user-agent. Finally, to serve up the actual pdf, set the content disposition to 'inline; filename=report.pdf', and the content-type to application/pdf

This is from memory, but it should hopefully help deal with IE/pdf weirdness.

On Monday, February 17, 2003, at 07:08 PM, Peter Kelley wrote:

We have recently come across a limitation with the Jasper Reports view
and Internet Explorer (Boo, hiss) and I thought I'd throw it open for
suggestions on the mailing list.

IE has trouble recognizing that what we send it when we run a report to
PDF is actually a PDF despite setting the mime type. The way to get
around this is to use a get instead of a post which makes IE happy but
leads to all of the parameters being visible on the URL. The problem
occurs when the number of parameters on the screen that generates the
PDF is so large that the URL length limit is exceeded. We have a page in
our system where this occurs.

Setting the content disposition to "attachment; filename=report.pdf" in
the JasperReportsViewServlet makes IE recognize that the result is a PDF
but brings up an "open or save" dialog when what is really wanted is to
open the PDF in the Acrobat reader plugin automatically.

Has anyone come across a way to get IE to recognize PDF's properly ?

--
Peter Kelley <[EMAIL PROTECTED]>
Moveit Pty Ltd



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to