Jump to content
We've recently updated our Privacy Statement, available here ×

Internet Explorer PDF problem


scottward

Recommended Posts

I load a PDF report with this link:

 

http://myserver:8080/jasperserver/flow.html?_flowId=viewReportFlow&reportUnit=/reports/ItemSales&output=pdf&StartDate=20070103000000&EndDate=20070103000000&StoreNumber=861

 

 

With Firefox, it loads no problem.

With Internet Explorer 6, I get a dialog that says:

"The file you are downloading cannot be opened by the default program. It is either corrupted or has an incorrect file type."

 

Same issue as here:

http://www.jasperforge.org/index.php?option=com_joomlaboard&Itemid=215&func=view&id=5449&catid=8

 

Except that I don't even have the option to Open. Just save or Close.

 

There are other posts about setting a header to "attachment" instead of "inline", but a) I'm not sure how to do that with JS and b) I'd rather it work properly and open in IE.

 

Why does this work on Firefox but not IE? How can I fix it?

 

Thanks,

 

Scotty

Post edited by: scottward, at: 2007/03/19 23:14

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

IE 7 is even worse:

- Click on a link within a PDF report to a dynamically generated drill down report (also a PDF) and the download is intercepted for "security reasons"

- Choose download and you get sent back to the original PDF report instead of the new one

- Basically, with IE 7 there is no way to link one PDF to another if the target PDF is dynamically generated using a URL as in my previous post.

 

Unfortunately, I can't just abandon IE users.

 

Has anyone else experienced this issue? Solved it?

 

Thanks,

 

Scott

Link to comment
Share on other sites

We have been having problems in this area with IE 6 and IE 7 via HTTPS, and even between different service packs for IE 6. One fix does not work for all browsers and versions. We have not seen problems under straight HTTP.

 

Do you login and then have problems running the reports, or are you just hitting a URL? By default, JS needs to set cookies, and IE implements P3P, a dead standard that , amongst other things, restricts the ability for a site to set cookies in the browser. We came across this as part of Jasper4Salesforce, which uses JS. The solution was to set the P3P header at the Tomcat or JBoss level to allow downloads to work.

 

 

 

Sherman

JasperSoft

Link to comment
Share on other sites

Thanks for the info Sherman. Here are the details of my setup and what's going on:

 

Server side:

- JS 1.2

- Tomcat 5.5.17

- HTTP (not HTTPS)

 

Client side:

- Internet Explorer version: 6.0.2900.2180.xpsp_sp2_gdr.061219-0316

- Also, IE version: 7.0.5730.11

- Both on Windows XP, SP 2

 

Report setup:

- Nightly schedule creates PDF reports

- These reports contain drill down links to a second PDF report that is generated on the spot and accessed via a URL as per the previous post

 

Process to reproduce bug:

- Login without a problem

- Navigate to previously generated PDF report no problem

- Click on the link to the second PDF report

- IE 6: "The file you are downloading cannot be opened by the default program. It is either corrupted or has an incorrect file type." with option to Save or Close (no option to Open).

- IE 7: see previous post

 

I think it has to do with the fact that the file type of flow.html doesn't match with the PDF report. IE "protects" the user from this in case someone is trying to trick them into loading a harmless HTML page and actually sending a malicious file. What do you think?

 

Sherman, I think that the fact that I can login without a problem means that cookies are being set. Am I right?

 

Given the setup and process I've described above, do you think I can resolve the problem by setting the P3P header in Tomcat? If so, can you point me in that right direction as far as how to do that (either directions or a link to a resource)?

 

Thanks!

 

Scott

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...