Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » iText »

Re: [iText-questions] creating pdf from byte[] of images

Md Sagri

2006-08-12

Replies:

Thanx Bruno
I have applied your exampleaand it worked for me

Bruno Lowagie <bruno@lowagie.com> wrote:
Md Sagri wrote:

> How can I create a document on the fly without needing to specify a
> fileOutputStream
>
>protected *PdfWriter*(PdfDocument document,
> OutputStream os)
>
> Constructs a |PdfWriter|.
> Remark: a PdfWriter can only be constructed by calling the method
> |getInstance(Document document, OutputStream os)|.
>
>
> I dont want to save the file, but just to send it. Is there an
> alternative to achive this. Please let me know

You probably haven't noticed it, but you have answered your own question.
Your question is about writing to a FileOutputStream. You want to avoid
that.

Then you show the javadoc generated API information of PdfWriter
that explains you don't have to write to a FileOutputStream, you can
write to any OutputStream (ServletOutputStream, ByteArrayOutputStream,
System.out,...)

Of course there are some pitfalls, but you'll find the workarounds here:
http://itextdocs.lowagie.com/tutorial/general/webapp/

br,
Bruno

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions


Here's a new way to find what you're looking for - Yahoo! Answers
Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
iText-questions mailing list
iText-questions@(protected)
https://lists.sourceforge.net/lists/listinfo/itext-questions
©2008 junlu.com - Jax Systems, LLC, U.S.A.