doc.open();
// 添加页眉
Image headerImage = Image.getInstance("f:\\1.jpg");
headerImage.scaleAbsolute(36, 36);
Paragraph headerPara1 = new Paragraph();
headerPara1.setAlignment(HeaderFooter.ALIGN_CENTER);
Phrase headerPara = new Phrase();
/**
* 插入表格 三列二行
*/
Table table = new Table(3);
int width[] = { 2, 10, 6 };
table.setWidths(width);
table.setBorderWidth(1);
table.setBorder(0);
table.setBorderColor(Color.BLACK);
table.setPadding(0);
table.setSpacing(0);
table.setWidth(100);
Cell cell = new Cell(headerImage);// 单元格
cell.setBorderWidth(0f); // 设置表格没有边框
cell.setBorderWidthBottom(1);
cell.setHeader(true);
cell.setRowspan(2);// 当前单元格占两行,纵向跨度
cell.setVerticalAlignment(Element.ALIGN_LEFT);
table.addCell(cell);
Cell cell