Hi,

Please note that I postet links to pastie.org for better readability of the
code snippets.

I am using iText to print graphs produced with the JUNG Framework to pdfs.
To achieve this I have the following code:

http://www.pastie.org/private/rsy6wzneedpvo4dai3vcgw

Writing the graphics Object to the pdf is done by the following code:

http://www.pastie.org/private/zgwocpvjih16j2cmcdmza

The produced ByteArrayOutputStream is used to save the content to a file
(works great - I get a wonderful pdf):

http://www.pastie.org/private/imxi9cmdrzowop9ivxgnba

The reason why I am generating a ByteArrayOutputStream is that I
additionally want to write the created pdf content to a ServletOutputStream:

http://www.pastie.org/private/r4h2lad26xbwjokoh0zbq

unfortunately the only thing I get is a PDF document in the desired
dimension but blank - no content :( I am using almost the same code for
writing text content to a ServletOutputStream and I do get the content - so
I think the code of the response is ok. Is there a problem of writing
ByteArrayOutputStream content containing iText data to ServletOutputStreams?
It is really weird that everything works when I write the
ByteArrayOutputStream content to a FileOutputStream and don't get anything
when I write it to the ServletOutputStream :(

It would be great if you could take a look at my code.

Thank you in advance!

Sebastian Furth
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to