Jump to content
Changes to the Jaspersoft community edition download ×

pdf running twice

Recommended Posts

By: Erica Marques - ericavision

pdf running twice

2003-05-28 11:00



When I open a report in pdf(response.setContentType("application/pdf")) on Internet Explorer 6.0, I checked that it was runned twice! This problem doesn t happen in Mozilla....

When I put the command to save the report (response.addHeader("content-disposition","attachment; filename=" + par_fileName +".pdf") ), the problem doesn t happen in both of them.


Does anybody know to say how I can fix this problem ?







By: Chuck Deal - cdeal

RE: pdf running twice

2003-05-28 12:54

This is a known problem with IE.


I have had this happen to me for quite sometime. I use a JSP to load the PDF. I recently switched over to a servlet and I think it may have helped the situation. I say "may" because I have had time to verify, but I do know that I received a significant performance boost when I made the change.






By: Paulo Soares - psoares33

RE: pdf running twice

2003-05-29 03:03

There's a solution for that. Here's what was answered in the iText mailing list:


My problem was if the request is sent 2/3 times, then the database will be updated 2/3 times.  Now the problem is solved, just detect the header of "user-agent", if it equals to "contype", then return before doing anything.  That way request will be sent multiple times still, but the body part will be submitted only once, so the database is in right status. 





By: Chuck Deal - cdeal

RE: pdf running twice

2003-05-29 12:28

Is it possible for you to post a link to the thread? I was not able to see a user-agent of "contype"


I just checked my headers when the JSP attempts to display the report. Yes, it hits the page twice, but both times, my user-agent is Mozilla/4.0 ....


I am using IE 5.5. The only difference between the headers is that on the second time, the "accept-language" is missing (when it was present the first time).







By: Paulo Soares - psoares33

RE: pdf running twice

2003-05-30 03:08

That's the whole thread. You can also check http://support.microsoft.com/default.aspx?scid=kb;EN-US;q293792

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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