}
}
}
// we paint the graphics of the table after looping through all the cells
LwgRectangle tablerec = new LwgRectangle(table);
tablerec.setBorder(table.getBorder());
tablerec.setBorderWidth(table.getBorderWidth());
tablerec.setBorderColor(table.getBorderColor());
tablerec.setBackgroundColor(table.getBackgroundColor());
PdfContentByte under = writer.getDirectContentUnder();
under.rectangle(tablerec.rectangle(top(), indentBottom()));
under.add(ctx.cellGraphics);
// bugfix by Gerald Fehringer: now again add the border for the table
// since it might have been covered by cell backgrounds
tablerec.setBackgroundColor(null);
tablerec = tablerec.rectangle(top(), indentBottom());
tablerec.setBorder(table.getBorder());
under.rectangle(tablerec);
// end bugfix
ctx.cellGraphics = new PdfContentByte(null);
// if the table continues on the next page