Quoting Ronald Tooley <[EMAIL PROTECTED]>:

> Hi, I am calling a servlet that creates the PDF file from a JPS. How do I set
> the filename and path for this file. I would like the path to be the users
> "My Documents" directory.
> 
>             Document document = new Document();

You want to write to a file, not a browser, so you don't need
a ByteArrayOutputStream: 
>             ByteArrayOutputStream baos = new ByteArrayOutputStream();
You can write directly to a FileOutputStream.
Read the Java API (from SUN) for java.io.FileOutputStream for
more info.

In you small code sample, you jump from step 1 to step 3,
you forgot step 2:
http://www.lowagie.com/iText/tutorial/ch01.html#step2

>             document.open();

Bruno

_______________________________________________________________

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

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

Reply via email to