You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by COFFMAN Steven <SC...@COVANSYS.com> on 2001/08/16 22:43:22 UTC

RE: FOP does not rendering PDF in IE5.5 SP1

If you're servlet URL is http://www.myweb.com/servlet/Myservlet
<http://www.myweb.com/servlet/Myservlet> 
then use http://www.myweb.com/servlet/Myservlet?extension=.pdf
<http://www.myweb.com/servlet/Myservlet?extension=.pdf> 
so you know if IE's ignoring the Mimetype. If that's not it, then it's
probably because you're using an older version of FOP. I believe (someone
correct me) that IE should be ok with the latest release.
-Steve

-----Original Message-----
From: Abdul Wahab [mailto:wahab@medical-online.net]
Sent: Friday, July 20, 2001 12:24 AM
To: fop-dev@xml.apache.org
Subject: FOP does not rendering PDF in IE5.5 SP1


Hi!
 
I have coded my servlet to convert PDF from XML using FOP.
It is working in Netscape. I can view my PDF.
When I try to run that particular servlet from IE5.5, It is not coming.
But I can see my rendered debugging message in the server console.
My code is below...
 
    .......
    .......
    byte[] content = out.toByteArray();
    response.setContentType("application/pdf");
    response.addHeader("Content-Disposition", "inline; filename=test.pdf");
    response.setContentLength(content.length);
    response.getOutputStream().write(content);
    response.getOutputStream().flush();
    response.getOutputStream().close();
 
I hope my code is correct.  But I couldn't understand why is this? Can you
help me.
 
Thanks,
Wahab.



RE: FOP does not rendering PDF in IE5.5 SP1

Posted by Alex McLintock <al...@yahoo.com>.
 --- COFFMAN Steven <SC...@COVANSYS.com> wrote: > If you're servlet URL is
http://www.myweb.com/servlet/Myservlet
> <http://www.myweb.com/servlet/Myservlet> 
> then use http://www.myweb.com/servlet/Myservlet?extension=.pdf
> <http://www.myweb.com/servlet/Myservlet?extension=.pdf> 
> so you know if IE's ignoring the Mimetype. If that's not it, then it's
> probably because you're using an older version of FOP. I believe (someone
> correct me) that IE should be ok with the latest release.
> -Steve

There are a variety of problems with Microsoft's IE. This solution cures the
problem for many people but I've also found situations where this extension isn't enough.
(In particular you may be posting to the servlet in which case adding "?something=.pdf" is
innappropriate. In such circumstances you might need to


1) Name your servlet "pdf" so that the URL looks like 

     http://www.myweb.com/servlet/MyservletPackage.pdf

2) Get your servlet to generate the pdf, save it to disk, send the browser a frameset which
    gets the browser to load the previously created PDF in one of the frames.
   PS make sure you have at least two frames else you'll confuse netscape :-)

Hope this helps - I've been banging my head against this one for most of last week
because *all* the machines I had access to worked fine, and almost all the machines
used by my American users didn't work. We eventually tracked it down to a particular
build of IE 5.5 sp1, and even getting the build number didn't guarantee which version
was installed :-(

Alex

(Remember Folks, Any additions to the FAQ - post them here with a big sign saying
ANSWER SHOULD GO IN THE FAQ)







=====
Alex McLintock        alex@OWAL.co.uk    Open Source Consultancy in London
OpenWeb Analysts Ltd, http://www.OWAL.co.uk/ 
SF and Computing Book News and Reviews: http://news.diversebooks.com/
Get Your XML T-Shirt <t-shirt/> at http://www.inversity.co.uk/

____________________________________________________________
Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org