document.add(watermark);
} else {
System.out.println("添加水印失败");
}
com.lowagie.text.Font ST3 = FontFactory.getFont("STSong-Light",
"UniGB-UCS2-H");
ST3.setSize(10f);
HeaderFooter footer = new HeaderFooter(new Phrase("第", ST3),
new Phrase("页", ST3));
footer.setBorder(Rectangle.NO_BORDER);
footer.setAlignment(Element.ALIGN_CENTER);
document.setFooter(footer);
// 加密
writer.setEncryption(PdfWriter.STRENGTH128BITS, null,
"hujichen0928", PdfWriter.AllowPrinting
| PdfWriter.AllowCopy);
// 添加元信息
document.addAuthor("北京科学技术委员会");
document.addSubject("评审基地项目列表");
document.open();
com.lowagie.text.Font ST = FontFactory.getFont("STSong-Light",
"UniGB-UCS2-H");
com.lowagie.text.Font ST22 = FontFactory.getFont("STSong-Light",
"UniGB-UCS2-H");
BaseFont baseFont2 = ST22.getBaseFont();
Font ST2 = new Font(baseFont2, 14, Font.BOLD);
com.lowagie.text.Font cnFont = new Font(bfHWXH);
ST.setSize(10);
ST2.setSize(12);
Table proinfoTab = new Table(8);
proinfoTab.setWidth(100.0f);
proinfoTab.setWidths(twidth);
proinfoTab.setCellspacing(4);
// 设置表框属性
Cell proinfoCell = new Cell(new Paragraph("2011年北京市第五批基地申报专家评审表",
ST2));
proinfoCell.setUseAscender(true);
proinfoCell.setHorizontalAlignment(Cell.ALIGN_CENTER);
proinfoCell.setVerticalAlignment(Cell.ALIGN_MIDDLE);
proinfoCell.setColspan(8);
proinfoTab.addCell(proinfoCell);
proinfoCell = new Cell(new Paragraph("重点评审项目", ST2));
proinfoCell.setUseAscender(true);
proinfoCell.setVerticalAlignment(Cell.ALIGN_MIDDLE);
proinfoCell.setHorizontalAlignment(Cell.ALIGN_CENTER);
proinfoCell.setColspan(8);
proinfoTab.addCell(proinfoCell);
proinfoCell = new Cell(new Paragraph("序号", ST2));
proinfoCell.setUseAscender(true);
proinfoCell.setVerticalAlignment(Cell.ALIGN_MIDDLE);
proinfoCell.setHorizontalAlignment(Cell.ALIGN_CENTER);
proinfoTab.addCell(proinfoCell);
proinfoCell = new Cell(new Paragraph("区县", ST2));
proinfoCell.setUseAscender(true);
proinfoCell.setVerticalAlignment(Cell.ALIGN_MIDDLE);
proinfoCell.setHorizontalAlignment(Cell.ALIGN_CENTER);
proinfoTab.addCell(proinfoCell);
proinfoCell = new Cell(new Paragraph("基地名称", ST2));
proinfoCell.setUseAscender(true);
proinfoCell.setVerticalAlignment(Cell.ALIGN_MIDDLE);
proinfoCell.setHorizontalAlignment(Cell.ALIGN_CENTER