使用PDFBox的圆角表

问题描述

我正在一个创建PDF的项目中,我需要生成一个带有圆角的表格。现在,我正在使用pdfBox 版本2.0.17 。有人有主意吗?

        Row<PDPage> row = baseTable.createRow(fontSize);

        Cell<PDPage> cell = row.createCell(10,"");
        Linestyle borderStyle = new Linestyle(Color.RED,0.5f);
        cell.setTopBorderStyle(null);
        cell.setLeftBorderStyle(null);
        cell.setRightBorderStyle(null);
        cell.setBottomBorderStyle(null);

        Cell<PDPage> cell2 = row.createCell(80,"Cell 2");
        cell2.setTopBorderStyle(borderStyle);
        cell2.setLeftBorderStyle(borderStyle);
        cell2.setRightBorderStyle(null);
        cell2.setBottomBorderStyle(null);

        cell2.setAlign(HorizontalAlignment.CENTER);
        cell2.setValign(VerticalAlignment.MIDDLE);

        Cell<PDPage> cell3 = row.createCell(10,"");
        cell3.setTopBorderStyle(borderStyle);
        cell3.setRightBorderStyle(borderStyle);
        cell3.setLeftBorderStyle(null);
        cell3.setBottomBorderStyle(null);

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)