"Are you saying you're trying to push more than one PDF to the response object?"

Yes, and based on the phrasing of your question I can see that it probably is the wrong way to handle it and probably why it didn't work :-)

In a nutshell I had four different routines that *could* create output that would be streamed to the browser. In the original design, I only got the first report. If others would be created, they weren't sent to the browser (at least, they weren't rendered). So I followed my own suggested idea and rather than creating a PDFWriter for *each* report, I created a single Document and instantiated a single writer and added the datatables for each report to the Document and, with adding some page breaks, I got the four individual reports to stream to the browser in one Document. My intent was to produce up to 4 individual reports/Documents but I am guessing that isn't possible without some more work. 4 reports in one document will work fine for now. Having 4 separate documents would be better so that they could be distributed individually.

"Also, using response.getOutputStream() is dangerous in PdfWriter"

What is the "best practice" then? I have some other reports (Jasper) /files (Excel spreadsheets) that are sent to the browser and that is the technique I use and it hasn't come back to haunt me (yet!).

Thanks

Pete



1T3XT info wrote:
Pete Helgren wrote:
I have a servlet that generates multiple reports that I would like to have delivered to the browser but I can't seem to get all of them to "appear". Only the first report I create displays. So the question is, what am I doing wrong?

Even with the pseudo code, I don't understand your question.

For every request object, you can send one PDF using the response object. Are you saying you're trying to push more than one PDF to the response object?

(Also, using response.getOutputStream() is dangerous in PdfWriter. It will work for most browsers, but not for some versions of MSIE.)
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
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