多行表格,含分页
示例代码
package test.create.c04;
import iofd.layout.OfdDocument;
import iofd.layout.block.Paragraph;
import iofd.layout.block.Table;
import java.util.ArrayList;
import java.util.List;
import test.create.TestDocUtil;
/**
* 多行表格的示例,含分页
* */
public class C0402MultipleColumnTable {
public static void main(String[] args) throws Throwable {
C0402MultipleColumnTable o = new C0402MultipleColumnTable();
o.done();
}
private void done() throws Throwable {
String clzName = this.getClass().getSimpleName();
System.out.println(clzName + " begin");
OfdDocument doc = new OfdDocument();
String s = "这是一个插入表格的示例。";
Paragraph p = new Paragraph();
p.add(s);
doc.add(p);
List head = new ArrayList<>();
head.add("标题一");
head.add("标题二");
head.add("标题三");
head.add("标题四");
head.add("标题五");
List> data = new ArrayList<>();
for(int i = 0; i < 100; i++) {
List