Hi Jason,
 
I also had problems displaying my pdf's.  I've got the following headers defined:
 
Content-type: application/pdf
Content-Disposition: inline; filename=report.pdf
 
I also calcuate the length of the file and set
 
Content-length: x
 
where x is the length of the string stream of the pdf
 
There's also something called accept ranges (mine is set to bytes ??) which is IE 6 only (but not sure what it is, try http://msdn.microsoft.com/library/default.asp?url="">)
 
Good Luck :-)
 
Daniel
----- Original Message -----
Sent: Sunday, November 30, 2003 2:04 AM
Subject: Re: Servlet File Download dialog problem (IE6,Adobe 6.0)

Thanks for the response.  I am setting the content type to "application/pdf".  It also does not seem to matter if I include the x=dummy.pdf parameter or not.  It still works the same.  The first time it attempts the download, the next time works like a charm.

Chris Pratt <[EMAIL PROTECTED]> wrote:
Make sure that you set the content type to "application/pdf".
  (*Chris*)
----- Original Message -----
Sent: Saturday, November 29, 2003 3:37 PM
Subject: Servlet File Download dialog problem (IE6,Adobe 6.0)

I'm new to FOP.  I'm trying to dynamically create a PDF from a struts web application.  In my action bean I execute a JSP URL that returns the FOP xml.  I take the return stream and place it into a reader and then pass it to renderFO method from the example servlet.
 
This seems to work like I want it to.  However, I'm running into an issue with IE.  Whenever I input the URL for my action bean, the first time through I get the "File Download window".  The file type is "Adobe Acrobat Control for ActiveX".  If I cancel and then resubmit the very same URL, the PDF is displayed.
 
I have read the FAQ and several messages about problems with IE but have not run across my exact problem.  In them they say to include a dummy.pdf at the end of the URL.  And to include a PDF extension as part of the base URL.  I have done both but still have the issue.
 
I have tried various URLs including:
 
....IncidentPDFPath.do?incidentSID=123245&x=dummy.pdf
....IncidentPDFPath.pdf?incidentSID=123245&x=dummy.pdf
 
With the same results.
 
The funny thing is the second time I submit the URL from the browser it works.  If I open a new browser and submit it I get the "File Download" window again the first time.  The second time from the same browser the PDF is displayed.
 
Thanks for any help.


Jason Smith
Project Refinery
www.projectrefinery.com
[EMAIL PROTECTED]


Jason Smith
Project Refinery
www.projectrefinery.com
[EMAIL PROTECTED]

Reply via email to