We found out that we had to do the following:

response.setContentType("application/pdf"); (as you are doing)
response.setHeader("Content-Disposition", "inline;filename=xxx.pdf; "); (IE
seems to need this)
response.setContentLength(pdf.length); (where pdf is the byte-Array
containing the pdf-file)

Björn

> -----Ursprüngliche Nachricht-----
> Von:  Martin Kuypers [SMTP:[EMAIL PROTECTED]]
> Gesendet am:  Montag, 20. Mai 2002 13:29
> An:   Struts Users Mailing List
> Betreff:      Re: problem diplaying on the fly generated PDF files within
> IE
> 
> I have the following problem
> 
> I generate PDF files on the fly using XSL FO togehter with a Taglibrary
> When i generate the PDF it shows up just fine within Netscape and within
> IE6.0 it shows it in an ascii form instead of Launching Acrobat Reader
> 
> Acrobat Reader is installed correctly and it shows not dynamically
> generated
> PDF filesnicely within IE6.0
> I read that i had to fake IE with adding ?fakeIE=test.pdf at the end of
> the
> call, but this doesn't seem to work eather
> 
> I included a file as a little example
> 
> The call looks like fo_2_pdf1.jsp?fakeIE=test.pdf
> 
> Any suggestions would help
> 
> Thanks
> Martin Kuypers
> 
> <%@taglib uri="/WEB-INF/fop.tld" prefix="fop" %>
> 
> <%response.setContentType("application/pdf");%>
> 
> <%String foFile = request.getParameter("fo");%>
> 
> <fop:fo2pdf>
> 
> <?xml version="1.0"?>
> 
> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format";>
> 
> <fo:layout-master-set>
> 
> <fo:simple-page-master master-name="simple"
> 
> page-height="11in"
> 
> page-width="8.5in"
> 
> margin-top="1in"
> 
> margin-bottom="1in"
> 
> margin-left="1in"
> 
> margin-right="1in">
> 
> <fo:region-body/>
> 
> </fo:simple-page-master>
> 
> </fo:layout-master-set>
> 
> 
> <fo:page-sequence master-name="simple">
> 
> <fo:flow flow-name="xsl-region-body" text-align="center">
> 
> <fo:block font-size="24pt">
> 
> Welcome to XSL FO!
> 
> </fo:block>
> 
> <fo:block font-size="18pt" color="blue">
> 
> Welcome, Welcome, Welcome
> 
> </fo:block>
> 
> </fo:flow>
> 
> </fo:page-sequence>
> 
> </fo:root>
> 
> </fop:fo2pdf>
> 
> 
> 
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to