Ram,

As I mentioned in my posting, I have the disposition set to "inline" i.e.,
the doc. is opened directly in the browser. This is a requirement and cant
be changed. It is in this setting that I want to get the file name
correctly.

> -----Original Message-----
> From: Ram Guttikonda [mailto:[EMAIL PROTECTED]] 
> Sent: Tuesday, October 08, 2002 4:07 PM
> To: Ramakrishna Kuppa; 'Robert Badaracco'; 
> [EMAIL PROTECTED]
> Subject: RE: [iText-questions] How to set the PDF file name?
> 
> 
> You might want to do something like this......
> 
> HttpServletResponse _hsr = _requestContext.getResponse(); 
> //get the servlet response _hsr.setContentType("application/pdf");
> String disposition = "attachment; filename=" + <your 
> filename>; _hsr.setHeader("Content-disposition", disposition);
> 
> 
> Hope that helps.
> 
> Cheers,
> Ram.
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf 
> Of Ramakrishna Kuppa
> Sent: Tuesday, October 08, 2002 1:09 PM
> To: 'Robert Badaracco'; [EMAIL PROTECTED]
> Subject: RE: [iText-questions] How to set the PDF file name?
> 
> 
> Bob,
> 
> I generate the doc. dynamically and it opens in the (IE) 
> browser directly (inline). I am NOT writing to a file. The 
> problem occurs when I try to save this generated doc.
> 
> 
> > -----Original Message-----
> > From: Robert Badaracco [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, October 08, 2002 1:06 PM
> > To: Ramakrishna Kuppa; [EMAIL PROTECTED]
> > Subject: Re: [iText-questions] How to set the PDF file name?
> >
> >
> > Define the path to your file as a String and then
> > declare a writer object like:
> >
> > PdfWriter writer = PdfWriter.getInstance(document, new 
> > FileOutputStream(filepath));
> >
> > Bob
> > --- Ramakrishna Kuppa <[EMAIL PROTECTED]>
> > wrote:
> > > I am able to generate the file properly. However,
> > > when I try to save it
> > > using the "Save" button, the filename that appears
> > > is the long query string
> > > related to my generation servlet. How can I set the filename 
> > > properly?
> > >
> > > Thanks
> > > Ramakrishna
> > >
> > >
> > >
> > -------------------------------------------------------
> > > This sf.net email is sponsored by:ThinkGeek
> > > Welcome to geek heaven.
> > > http://thinkgeek.com/sf 
> > > _______________________________________________
> > > iText-questions mailing list [EMAIL PROTECTED]
> > >
> > https://lists.sourceforge.net/lists/listinfo/itext-questions
> >
> >
> > __________________________________________________
> > Do you Yahoo!?
> > Faith Hill - Exclusive Performances, Videos & More
> http://faith.yahoo.com
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf 
> _______________________________________________
> iText-questions mailing list [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to