Hi,
I have a multiple column table that spans 2 pages. The issue is, I can't get the cell borders to continue to the next page, for column that does not have text, or when the text is not long enough to span to the secod page. Your help is much appreaciated.
Current scenario
Page1
start text text text text | start text end |
Page 2
text end | ||||
text | text | text | text | text |
Desired scenario
Page1
start text text text text | start text end |
text end | ||||
text | text | text | text | text |
My method to paint the cell
public void writeColumn(Table table, String colName, Font fontName, int colSpan, int colAlignment, boolean isHeader, Vector borders)
throws DocumentException{
try{
Cell cell = new Cell();
int border = 0;
cell.setLeading(18);
if (isHeader) {
cell.setHeader(true);
cell.setGrayFill(0.9f);
}
for (int i=0; i< borders.size();i++){
border = border | Integer.parseInt((String)borders.elementAt(i));
}
cell.setBorder(border);
cell.add(new Phrase(colName, fontName));
cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
cell.setHorizontalAlignment(colAlignment);
cell.setColspan(colSpan);
table.addCell(cell);
}catch(Exception e){
e.printStackTrace();
throw new DocumentException(e.getMessage());
}
}
Saw Chee Kong
IT Specialist
Transaction Services
Application Management Services
Strategic Outsourcing, IBM Global Services
Email : [EMAIL PROTECTED]
Office : (65) 6878 7913
Fax : (65) 6878 7072
<<inline: ecblank.gif>>