I don't have time to look into it now, but it's usually a good idea to try it in a stand alone app if it works there, there is something with your servlet code.

For the page numbers you could use PageEvent.
Note, without  an example of your code we can't really help you.


Kind regards
Balder

On 14/10/2011 20:48, Tim Troy wrote:

I have requirements as follows:


Using Java Servlets, print pdf reports with page numbers, 1 of 3, 2 of 3, etc... I did this using PdfpTables and then applying a Stamper for the page numbering.The reports are dynamically generated from database rows.Life is good for one report at a time.


The next level is to concatenate the reports in a related group.


If the group has 3 reports it could look like below, 3 reports with varying number of pages.Each individual report can stand on its own.


1 - 1 of 2

2 - 2 of 2

3 - 1 of 1

4 - 1 of 3

5 - 2 of 3

6 - 3 of 3


In this example, the total output is 6 pages, but the page numbering I placed with the Stamper needs to stay the same.


I tried to save the byte[]'s from the ByteArayOutputStream and concatenate them before writing them out to the ServletOutputStream.Debugging I see the byte[] increasing in size as expected, but this only produces a PDF with the last report in the list presented to the browser plugin.


I can imagine other approaches but felt I may miss the best approach.


I have the first version of iText in Action for a reference.


--
Tim Troy
ase check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php


--
twitter <http://twitter.com/redlabbe>
redlab-log <http://www.redlab.be/blog/>
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to