Quoting Ronald Tooley <[EMAIL PROTECTED]>:

> Hi, how do you specify the file name when running from
> a servlet that creates the
> output to the screen.

Just follow the Servlet examples 
(e.g.: http://www.lowagie.com/iText/examples/OutSimplePDF.java)
but add this:

> String filename = "myFileName.pdf";
  response.setContentType("application/pdf");
> response.setHeader("Content-Disposition", "attachment;filename=" + filename);
  response.setContentLength(baos.size());

_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas - 
http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink

_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to