httpservletresponse.setHeader("Content-disposition", "attachment;
filename=\"" + title + ".pdf\"");
should work.
Good luck
On Tue, Jan 11, 2011 at 2:23 PM, ultimate21 <[email protected]> wrote:
>
>
> Hi All,
>
> I'm new to iText and am using the version 2.1.3
> I'm generating a report in PDF using servlets. This report is displayed in
> a
> popup window.
> The Servlet path is displayed in the titlebar of the popup as:
> http://localhost:8080/ProjName/servlet/DetailsPDF
>
> When I try to save the pdf doc by clicking on the save icon, the name of
> this file is saved as DetailsPDF.pdf.
> I want to be able to save it with a different name, for e.g. 1234.pdf where
> the '1234' is an id which will be different each time for each user.
> How is this possible using iText ?
>
> Please help me out, will be highly obliged.
>
> Regards,
> Vinay
> --
> View this message in context:
> http://itext-general.2136553.n4.nabble.com/Saving-PDF-file-generated-by-Servlet-with-a-different-name-tp3209538p3209538.html
> Sent from the iText - General mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Protect Your Site and Customers from Malware Attacks
> Learn about various malware tactics and how to avoid them. Understand
> malware threats, the impact they can have on your business, and how you
> can protect your company and customers by using code signing.
> http://p.sf.net/sfu/oracle-sfdevnl
> _______________________________________________
> iText-questions mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>
> Many questions posted to this list can (and will) be answered with a
> reference to the iText book: http://www.itextpdf.com/book/
> Please check the keywords list before you ask for examples:
> http://itextpdf.com/themes/keywords.php
>
--
Nurettin DAG
------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand
malware threats, the impact they can have on your business, and how you
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Many questions posted to this list can (and will) be answered with a reference
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples:
http://itextpdf.com/themes/keywords.php