Hi

Looked into some of the old code I had lying around, and remembered that I did 
this:

                        response.setContentType("application/pdf");
                        response.setHeader("Expires", "0");
                        response.setHeader("Cache-Control",
                                        "must-revalidate, post-check=0, 
pre-check=0");
                        response.setHeader("Pragma", "public");

Hermod

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 17, 2007 10:43 AM
To: [email protected]
Subject: RE: [ABOT] Sending pdf file from webserver to browser?


Hi

This content type is handled differently by various browsers. Some browser will 
give a choice saving or opening, while others will open it directly using its 
pdf plugin. I seem to remember a solution for was described on the struts 
mailing list a while back. Try googling for it.

Hermod

-----Original Message-----
From: Bjørn T Johansen [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 17, 2007 10:37 AM
To: [email protected]
Subject: Re: [ABOT] Sending pdf file from webserver to browser?


Yes, I am setting it to application/pdf... Why?

BTJ

On Wed, 17 Jan 2007 10:30:38 +0100
<[EMAIL PROTECTED]> wrote:

> Hi
> 
> Are you setting the content-type on the response?
> 
> Hermod
> 
> -----Original Message-----
> From: Thorbjørn Ravn Andersen [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, January 17, 2007 10:13 AM
> To: MyFaces Discussion
> Subject: Re: [ABOT] Sending pdf file from webserver to browser?
> 
> 
> Bjørn T Johansen skrev  den 16-01-2007 14:42:
> > I have a myfaces webapp that uses a report component to generate a pdf file 
> > on the server. This file is
> > sent to the browser and the user then get a choice of saving the file or 
> > opening the file, eg. in Acrobat.
> >
> > And I was wondering, it is possible to skip the opening og saving dialog 
> > and go straight to printing the
> > pdf file? As far as I can tell, this isn't possible..
> I don't think so, unless you can print to the users printer from the server.
> 


* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

This email with attachments is solely for the use of the individual or
entity to whom it is addressed. Please also be aware that the DnB NOR Group
cannot accept any payment orders or other legally binding correspondence with
customers as a part of an email. 

This email message has been virus checked by the anti virus programs used
in the DnB NOR Group.

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

Reply via email to