You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by ja...@init.se on 2001/01/08 16:17:51 UTC

"?" when rendering pdf from fo

Hi All!

When requesting an xml-document that uses the fopdf-formatter 
through an HTML-link ,
I must append a "?" to the end of the HREF - attribute for the formatter to
start. 
Without the "?" I only recieve a blank screen in IE5

ex.

must be
<a href="xmltofo.xml?">xmltofo</a>

and not
<a href="xmltofo.xml">xmltofo</a>

Why this behavior, is it a bug?

TIA
jakob

Re: "?" when rendering pdf from fo

Posted by Berin Loritsch <bl...@apache.org>.
jakob@init.se wrote:

> Hi All!
> 
> When requesting an xml-document that uses the fopdf-formatter 
> through an HTML-link ,
> I must append a "?" to the end of the HREF - attribute for the formatter to
> start. 
> Without the "?" I only recieve a blank screen in IE5
> 
> ex.
> 
> must be
> <a href="xmltofo.xml?">xmltofo</a>
> 
> and not
> <a href="xmltofo.xml">xmltofo</a>
> 
> Why this behavior, is it a bug?

It is an identified bug with the Acrobat Plugin for IE.
What makes matters worse, is that the "?" at the end
doesn't help with IE 5.5.  We are looking at ways around
this by doing special things with the serialization code.


Re: "?" when rendering pdf from fo

Posted by Sylvain Wallez <sy...@anyware-tech.com>.

jakob@init.se a écrit :
> 
> Hi All!
> 
> When requesting an xml-document that uses the fopdf-formatter
> through an HTML-link ,
> I must append a "?" to the end of the HREF - attribute for the formatter to
> start.
> Without the "?" I only recieve a blank screen in IE5
> 

There are solutions in the FAQ. I also recently posted
yet-another-solution on this list (Robin, how do I get it added to the
FAQ ?) :


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.setHeader("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.


Hope this helps
-- 
Sylvain Wallez
Anyware Technologies