One other thing--if you are meaning to attach the PDF
to an e-mail, and nothing else, it seems to me more
direct to go ahead and create a FileDataSource and
pass your PDFWriter its OutputStream.
-Matt
--- Xavier Combelle <[EMAIL PROTECTED]> wrote:
> getting OutputStream for further processingItext
> don't create a
> pdf-stream, it just
> use the stream which is passed in parameter of
> PdfWriter.getInstance();
> so, if you want to use a stream, you must to create
> it.
>
> in the sample is created by new
> FileOutputStream("Chap0101.pdf"));
> but you can a create a Stream which don't print
> anithing with new
> ByteArrayOutputStream();
>
> // for example
>
> OutputStream os = new ByteArrayOutputStream();
>
>
> // step 1: creation of a document-object
> Document document = new Document();
>
> try {
>
> // step 2:
> // we create a writer that listens to
> the document
> // and directs a PDF-stream to a file
>
> PdfWriter.getInstance(document, os);
>
>
>
> // step 3: we open the document
> document.open();
>
> // do what you want on the document
> document.add(new Paragraph("Hello
> World"));
>
>
> document.close();
>
> catch(DocumentException de) {
> System.err.println(de.getMessage());
> }
> // here the os is now ready to do what you want with
> it
>
> Yours sincerely
> Xavier
>
>
> -----Message d'origine-----
> De : [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]
>
> De la part de Kroneder Christoph
> Envoy� : jeudi 4 juillet 2002 14:26
> � : '[EMAIL PROTECTED]'
> Objet : [iText-questions] getting OutputStream for
> further processing
>
>
> Dear itext-Team,
>
> I'm very interested in your product because I want
> to send mails
> automatically with an pdf attachment. Now I have
> implemented itext like
> example1 but I'm not able to get the pdf-stream. I
> want not to write a
> pdf-file on the server instead I need the pdf-stream
> for further processing.
>
> Can you help me?
>
> Yours sincerely
> Christoph
>
>
>
>
__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Bringing you mounds of caffeinated joy.
http://thinkgeek.com/sf
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions