This is probably because the browser you are using has been setup to react to 
pdf's that way. Check the browser settings, there
should be a way to change the default behavior. The only issue will be that you 
have no control how the users have setup their
browsers. As far as I know, there is no way to force the browser to use a 'Save 
As' dialog against the users wishes.
 
 
Edward W. Rouse

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Angelo Luis
Sent: Tuesday, March 11, 2008 11:42 AM
To: Post all your questions about iText here
Subject: Re: [iText-questions] Download HTML to PDF file. Show the "Save 
as"dialog


Using Java EE ... :(


On Tue, Mar 11, 2008 at 1:31 PM, Sérgio Oliveira <[EMAIL PROTECTED]> wrote:


Hello,
 
Are you using .net? If so, see the Response.TransmitFile method.
 


  _____  

Date: Tue, 11 Mar 2008 09:35:19 -0300
From: [EMAIL PROTECTED]
To: iText-questions@lists.sourceforge.net
Subject: [iText-questions] Download HTML to PDF file. Show the "Save as" dialog 


Hello,

My application has a option that transforms a HTML page to a PDF and donwloads 
the PDF from the web server. "Simple". For this I use
the combination of iText, JTidy and Flying Saucer. The problems arrives when 
download the PDF from a Struts Action. I want to show
the Save As dialog, but always the browser open the reader, always. :(

Look my code when a configure the response:

response.setContentType( "application/octet-stream" ); // I try to use 
application/pdf to
        
response.setHeader("Expires", "0");
response.setHeader("Cache-Control", "must-revalidate, post-check=0, 
pre-check=0");
response.setHeader("Pragma", "public");
response.setHeader("Content-disposition", "attachment;filename="+ fileName );
response.setContentLength( bout.size() );

out.flush();



PS: Sorry for my english.


Angelo Galvão



  _____  

Express yourself instantly with MSN Messenger! MSN  
<http://clk.atdmt.com/AVE/go/onm00200471ave/direct/01/> Messenger

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/




-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to