iText 7无边界表格(无边界) [英] iText 7 borderless table (no border)
本文介绍了iText 7无边界表格(无边界)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
下面的代码不起作用.
Table table = new Table(2);
table.setBorder(Border.NO_BORDER);
我是iText 7的新手,我想要做的就是使表无边界.喜欢怎么做?
I am new to iText 7 and all I wanted is to have my table borderless. Like how to do it?
推荐答案
默认情况下,表格本身不负责iText7中的边框,而单元格则负责.如果要使用无边界表格,则需要将每个单元格设置为无边界(或者,如果仍要在内部边界内,则将外部单元格的边缘设置为无边界).
The table itself is by default not responsible for borders in iText7, the cells are. You need to set every cell to be borderless if you want a borderless table (or set the outer cells to have no border on the edge if you still want inside borders).
Cell cell = new Cell();
cell.add("contents go here");
cell.setBorder(Border.NO_BORDER);
table.addCell(cell);
这篇关于iText 7无边界表格(无边界)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文