Hi all,
sorry for my wrong reply on the other discussion...
However, my question is:
why this code:
private static void createDocument(Document document) throws
DocumentException {
for (int i = 0; i < 1000; i++) {
Table rowTable = createTable();
document.add(rowTable);
}
}
private static Table createTable() throws BadElementException {
Table datatable = new Table(1);
datatable.setCellsFitPage(false);
datatable.setTableFitsPage(false);
datatable.setPadding(4);
datatable.setSpacing(0);
datatable.setWidth(100);
Cell cell = new Cell(new Phrase("Administration -System Users
Report",FontFactory.getFont(FontFactory.HELVETICA, 24, Font.BOLD)));
cell.setHorizontalAlignment(Element.ALIGN_CENTER);
cell.setLeading(40);
cell.setBorder(Rectangle.NO_BORDER);
datatable.addCell(cell);
return datatable;
}
Why does this code produces the pdf in attachment of this mail?
I mean that I don't understand why all the pages located in a even position,
contain only one table...do you know?
I've also noticed that, if I put the following line:
datatable.setPadding(5);
then all the pages are OK
but if I set the padding value to other values different of 5 then I have the
same problem, is there an explanation?
Thank you very much,
best regards.
Raffaele
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/