PdfPTable bTable = new PdfPTable(7);
PdfPCell cell = null;
cell = new PdfPCell(new PdfPCell(new Paragraph("日期",font2)));
cell = new Cell(new Cell(new Paragraph("日期",font2)));
cell.setRowspan(2);
cell = new PdfPCell(new PdfPCell(new Paragraph("类型",font2)));
cell.setRowspan(2);
cell.setColspan(2);//合并这个两行两列的时候老时报错,空指针异常
http://fruitking.iteye.com/blog/1961421
http://outofmemory.cn/code-snippet/1892/usage-iText-word-document-insert-complex-form
调试跟踪下,到底是哪个对象为空。