发布于 2018-09-10 19:14:23
表类
我看了一下Table的boxable类。看起来这些似乎是您拥有的唯一样式选项(至少在这个类中是这样):
public Table(float yStartNewPage, float pageTopMargin, float pageBottomMargin, float width, float margin,
PDDocument document, boolean drawLines, boolean drawContent, PageProvider<T> pageProvider)请参阅:https://github.com/dhorions/boxable/blob/master/src/main/java/be/quodlibet/boxable/Table.java
我知道也可以包含超文本标记语言,所以也许你应该尝试使用超文本标记语言格式化,比如:<table bordercolor=”red”>
单元格类
Cell类似乎有一个LineStyle。因此,在下面的代码(摘自单元测试)中,您可以执行其他操作,这是有意义的。
Cell<PDPage> cell = headerRow.createCell(100, "Awesome Facts About Belgium");
cell.setFont(PDType1Font.HELVETICA_BOLD);
cell.setFillColor(Color.BLACK);
cell.setTextColor(Color.WHITE);cell.setBottomBorderStyle(new LineStyle(Color.RED, 2));
table.addHeaderRow(headerRow);https://stackoverflow.com/questions/52256385
复制相似问题