I am using PDFPTable to build a report that spans multiple pages. The report
is essentially composed of the data in the ptable and a footer and header,
regardless if it is 30 pages or 2/3.
writer.setPageEvent(new EndPage());
Here is my footer:
public void onEndPage(PdfWriter writer, Document document) {
buf.append("Fees collected: Application fee $0\n");
foot.setTotalWidth(document.right() - document.left());
foot.writeSelectedRows(0, -88, document.leftMargin(),
document.bottomMargin() + 90,
writer.getDirectContent());
}
Here is my report data on each page:
while(30 pages) {
...
...
final Chunk row_c12 = new Chunk (bean.getAppNo(), font);
final Phrase row_c12_phr = new Phrase();
row_c12_phr.add(row_c12);
table.addCell(row_c12_phr);
...
...
table.setTotalWidth(document.rightMargin() - document.leftMargin());
table.setWidthPercentage(100);
}
document.add(table);
---------
My question:
In the while loop that spans so many rows. Is there a way to constrain how
many rows are printed on each page so that the data on each page doesn't
overlap the footer. (Actually, it looks like the footer is overlapping the
report content).
I figure there is some way to set the height? maybe. But it has to apply
specifially for each page.
E.g on page 1-30. The report rows may show up for 60% of the height of that
particular page.
--
Berlin Brown
email: berlin-dot-brown-AT-gmail-dot-com
http://botspiritcompany.com/botlist/
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://www.1t3xt.com/docs/book.php