By Date: <-- -->
By Thread: <-- -->

iText in a servlet using ByteArrayOutputStr eam



Detlef Nebermann wrote:

> Hi Bruno,
> i think there is a misunderstood.
> when creating a pdf-file, download it and open it in the browser, i can save the document on the local hd.


OK.

> Doing so with ByteArrayOutputStream, i cannot save the document.

??? What do you mean ???
In the code sample you have sent in you OP,
you are using ByteArrayOutputStream.
I guess you are using this code snippet
and you are able to save the PDF file on
the hard disk at the client side.

Do you want to save the PDF on server side too?
Then just create a FileOutputStream.
Use it with PdfWriter.getInstance or write the
ByteArrayOutputStream to the FileOutputStream.

These are basic Java Programming skills.

> BTW, can you please tell me how to create a pdf document
> with a vertical page layout instead of the default horizontal?

Why isn't anyone reading the tutorial anymore?
Moreover the question has just been answered on the mailing list!
http://article.gmane.org/gmane.comp.java.lib.itext.general/20842

br,
Bruno



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
iText-questions mailing list
iText-questions (at) lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions