0
我使用iText创建表格。每张桌子有2列,除了桌子的最左边,最右边,最上面和最底面以外没有边界。我能够实现这一点,但是当新页面开始时会出现问题。我希望在页面的末尾绘制水平线,并在开始时绘制另一条水平线。我已用在iText的页面底部绘制一条水平线?
@Override
public void onEndPage(PdfWriter arg0, Document arg1) {
PdfPCell pdfpcells[] = pdfptable.getRow(pdfptable.getRows().size()-1).getCells();
pdfpcells[0].setBorderWidthBottom(0.5f);
if(pdfpcells[1] != null){ //There is a possibility that there are odd number of elements
pdfpcells[1].setBorderWidthBottom(0.5f);
}
}
绘制水平线在假设这功能页的端部被称为每次页端尝试,并因此使用的行当前数目。 pdfptable被声明为类变量。这似乎并不奏效。我正在使用最新版本的iText。 谢谢。
retagged: - jsf + java – pakore 2010-07-15 10:03:04