Hi @all,
iText works pretty well for me since I switched from Table to PdfTable
(or PdfPTable). Until I discovered yesterday that nested tables are
still not working properly.
I have table with 2 columns and I want to put a nested table into one
cell. The amount of columns of this nested table depends on some values
in a database. But from time to time cellTable does not get displayed in
the pdf file (part of source code at the end of the mail). Any
suggestions why?
Thanks in advance
Daniel Brenner
PdfPTable table = new PdfPTable(2);
table.setWidthPercentage(100);
table.getDefaultCell().setPadding(2);
table.getDefaultCell().setPaddingBottom(6);
int headerwidths[] = {16, 17};
table.setWidths(headerwidths);
PdfPCell tableHeading = new PdfPCell(new Phrase("titel"));
tableHeading.setHorizontalAlignment(Element.ALIGN_CENTER);
tableHeading.setBorderWidth(0);
tableHeading.setColspan(2);
table.addCell(tableHeading);
table.addCell(new Phrase("colum"));
table.addCell(new Phrase("colum"));
table.setHeaderRows(2);
tableHeading.setVerticalAlignment(Element.ALIGN_MIDDLE);
PdfPTable cellTable = new PdfPTable(5);
cellTable.setWidthPercentage(100);
cellTable.getDefaultCell().setBorderWidth(0);
cellTable.getDefaultCell().setHorizontalAlignment(Element.ALIGN_MIDDLE);
cellTable.getDefaultCell().setVerticalAlignment(Element.ALIGN_MIDDLE);
PdfPCell cell = new PdfPCell(new Phrase("1"));
// cell.setBorderWidth(0);
cellTable.addCell(cell);
table.addCell(cellTable);
__________________________________________________________________
Gesendet von Yahoo! Mail - http://mail.yahoo.de
Bis zu 100 MB Speicher bei http://premiummail.yahoo.de
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions