At 02.33 18/02/2003, Peter Kelley wrote:
Content length is already being set.
The way we do it (more or less, can't post the actual code):

byte[] bytesPdf = doPdf(...); // builds the PDF in a buffer
ServletOutputStream sendout = response.getOutputStream();
response.setContentLength(bytesPdf.length);
response.setContentType("application/pdf");
response.setHeader("Content-Disposition", "inline; filename=brochure.pdf");
sendout.write(bytesPdf);
sendout.flush();
sendout.close();

Basically, the MSIE-specific tricks are:

- setting the content length
- setting the Content-Disposition header with a pseudo-filename that has the extension corresponding to the content type

This has worked so far for us with MSIE 5.0, 5.5 and 6.0.

Hope this helps.

Sebastiano Pilla
E-TREE S.p.a. Via Fonderia 43 - 31100 Treviso (Italy)
phone +39.0422.3107 fax +39.0422.310888
http://www.e-tree.com http://www.webanana.com



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