211 Star 1.6K Fork 393

dromara / x-easypdf

 / 详情

3.0.0-beta 版本 导出表格分页时 表格边缘 边框消失

待办的
创建于  
2024-03-11 11:48

`private static TableRow createRow(String backgroundColor, String style, List<String[]> mRowTexts, boolean isTitle, boolean needSpan) {
TableRow row = TemplateHandler.Table.Row.build();
for (int i = 0; i < mRowTexts.size(); i++) {
String[] rowText = mRowTexts.get(i);
Text[] array = new Text[rowText.length];
for (int j = 0; j < rowText.length; j++) {
Text xEasyPdfTemplateText = TemplateHandler.Text.build().setText(rowText[j]).setFontSize("9");
array[j] = xEasyPdfTemplateText;
}
TableCell cell = TemplateHandler.Table.Cell.build().addComponent(
array
)
.setBorder("1pt")
.setBorderStyle("solid")
.setBorderColor("#C4C4C4")
.setBackgroundColor(backgroundColor)
.setHorizontalStyle(style);

        if (!isTitle && i == 0 && needSpan) {
            cell.setRowSpan(2);
        }
        if (i < 2) {
            cell.setWidth("50");
        } else if (!isTitle) {
            cell.setHorizontalStyle("left");
        }
        row.addCell(
                cell
        );
    }
    return row;
}`

输入图片说明

评论 (1)

niuniu 创建了任务

其实没有边框消失,因为你是合并行,刚好分页了

登录 后才可以发表评论

状态
负责人
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
参与者(2)
1494292 xsxgit 1585187915
Java
1
https://gitee.com/dromara/x-easypdf.git
git@gitee.com:dromara/x-easypdf.git
dromara
x-easypdf
x-easypdf

搜索帮助

53164aa7 5694891 3bd8fe86 5694891