cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylvain.wal...@anyware-tech.com>
Subject IE bug whith FOP-produced PDFs : another solution
Date Fri, 22 Dec 2000 14:09:28 GMT
Hi cocooners,

There is periodically a thread on this list about "PDF files produced by
FOP do not display in Internet Explorer". The Cocoon FAQ explains the
bug and gives some hints at
http://xml.apache.org/cocoon/faqs.html#faq-iepdfbug

I found yet another solution : by adding a "Content-Disposition" header
in the servlet response (thanks to Matthew Smith for the hint), IE
considers the file extension of this header instead of the one of the
request.

So try adding the following in your XSP :
 <xsp:logic>
    response.addHeader("Content-Disposition", "attachment;
filename=foo.pdf");
 </xsp:logic>
and IE will display your PDF !

The only drawback is that IE shows the "save or open" dialog and
displays the document in a separate window.
Netscape's behaviour is not affected and it uses the Acrobat plugin as
usual.

I tested it with IE 5.0 / Netscape 4.7.

Cheers,
-- 
Sylvain Wallez
Anyware Technologies

Mime
View raw message