你在操作pdf文件??有代码没??
解决方案 »
- ArrayList源码问题
- spring拦截器,如何拦截父类的方法
- 谁有截取url中 一级域名的 java代码
- 急求一份J2EE中文版的帮助文档!!!
- ssh2+dwr,出点问题,求助
- 如何得到刚插入数据的Id
- 利用<html:select><html:options>标签显示集合的值,同时把选中的值利用<html:form>标签提交到后台.
- hibernate查询 SELECT distinct s.name,s.age from table s 菜鸟求救!!
- 100分 tomcat 连接sqlserver时 (在tomcat启动的dos界面中出现超时连接,但程序连接数据库没问题 ,这是怎么回事啊???
- [算法]将字符串转换为树形结构,标题要长
- 请大侠出手介绍一下JMX和MBeans!谢谢!
- struts,SQL语句问题(delete)
RtfWriter docWriter = null;
output=new FileOutputStream(filepath+".doc");
docWriter = RtfWriter.getInstance(document,output);
document.open();
HeaderFooter footer = new HeaderFooter(new Phrase(""), true);
footer.setAlignment(1);
document.setFooter(footer);
Paragraph paragraph1 = new Paragraph("陕西省专家推荐书",FontFactory.getFont(FontFactory.COURIER_BOLDOBLIQUE, 18));
paragraph1.setAlignment(1);
document.add(paragraph1);
System.out.println("expertBean.getExpertKey()"+expertBean.getExpert_name());
float[] widths= {
20f, 20f, 20f, 20f, 20f, 20f};
Paragraph paragraph2 = new Paragraph("一、专家基本信息表",FontFactory.getFont(FontFactory.COURIER_BOLDOBLIQUE, 18));
paragraph2.setAlignment(1);
document.add(paragraph2);
Table table = new Table(6);
table.setWidths(widths);
table.setBorderWidth(1);
table.setBorderColor(new Color(0, 0, 255));
table.setDefaultVerticalAlignment(1);
table.setDefaultHorizontalAlignment(1);
Cell expert_man = new Cell(new Paragraph("专家姓名",FontFactory.getFont(FontFactory.COURIER_BOLDOBLIQUE, 10.5f)));
expert_man.setRowspan(2);
System.out.println("expertBean.getGender().trim()"+expertBean.getGender().trim());
table.addCell(expert_man);
Cell expert_man1 = new Cell(new Paragraph(expertBean.getExpert_name().trim()+"",FontFactory.getFont(FontFactory.COURIER_BOLDOBLIQUE, 10.5f)));
expert_man1.setRowspan(2);
table.addCell(expert_man1);
Cell expert__gendar = new Cell(new Paragraph("性别",FontFactory.getFont(FontFactory.COURIER_BOLDOBLIQUE, 10.5f)));
expert__gendar.setRowspan(2);
expert__gendar.setColspan(1);
table.addCell(expert__gendar);
Cell expert__gendar1 = new Cell(new Paragraph(expertBean.getGender().trim()+"",FontFactory.getFont(FontFactory.COURIER_BOLDOBLIQUE, 10.5f)));
expert__gendar1.setRowspan(2);
table.addCell(expert__gendar1);Cell expert__ecode = new Cell(new Paragraph("编码",FontFactory.getFont(FontFactory.COURIER_BOLDOBLIQUE, 10.5f)));
expert__ecode.setRowspan(2);
table.addCell(expert__ecode);
Cell expert__ecode1 = new Cell(new Paragraph(expertBean.getExpertCode().trim(),FontFactory.getFont(FontFactory.COURIER_BOLDOBLIQUE, 10.5f)));
expert__ecode1.setRowspan(2);
table.addCell(expert__ecode1);
Cell expert__nation = new Cell(new Paragraph("民族",FontFactory.getFont(FontFactory.COURIER_BOLDOBLIQUE, 10.5f)));
expert__nation.setRowspan(2);
table.addCell(expert__nation);
Cell expert__nation1 = new Cell(new Paragraph(expertBean.getNation().trim(),FontFactory.getFont(FontFactory.COURIER_BOLDOBLIQUE, 10.5f)));
expert__nation1.setRowspan(2);
table.addCell(expert__nation1);
Cell party = new Cell(new Paragraph("党派",FontFactory.getFont(FontFactory.COURIER_BOLDOBLIQUE, 10.5f)));
party.setRowspan(2);
table.addCell(party);
Cell expert__party = new Cell(new Paragraph(expertBean.getParty(),FontFactory.getFont(FontFactory.COURIER_BOLDOBLIQUE, 10.5f)));
expert__party.setRowspan(2);
table.addCell(expert__party);
Cell expert_borndate = new Cell(new Paragraph("出生时间",FontFactory.getFont(FontFactory.COURIER_BOLDOBLIQUE, 10.5f)));
expert_borndate.setRowspan(2);
table.addCell(expert_borndate);
Cell expert_borndate1 = new Cell(new Paragraph(expertBean.getBornDate().trim(),FontFactory.getFont(FontFactory.COURIER_BOLDOBLIQUE, 10.5f)));
expert_borndate1.setRowspan(2);
table.addCell(expert_borndate1);
Cell expert_graduatedate = new Cell(new Paragraph("毕业时间",FontFactory.getFont(FontFactory.COURIER_BOLDOBLIQUE, 10.5f)));
expert_graduatedate.setRowspan(2);
table.addCell(expert_graduatedate);
Cell expert_graduatedate1 = new Cell(new Paragraph(expertBean.getGraduateDate().trim(),FontFactory.getFont(FontFactory.COURIER_BOLDOBLIQUE, 10.5f)));
expert_graduatedate1.setRowspan(2);
table.addCell(expert_graduatedate1);
expert_specScholarship.setRowspan(6);
table.addCell(expert_specScholarship);
Cell expert_specScholarship1 = new Cell(new Paragraph(expertBean.getSpecScholarship().trim(),FontFactory.getFont(FontFactory.COURIER_BOLDOBLIQUE, 10.5f)));
expert_specScholarship1.setRowspan(6);
expert_specScholarship1.setColspan(5);
table.addCell(expert_specScholarship1);
Cell expert_shoulder = new Cell(new Paragraph("担任省评情况",FontFactory.getFont(FontFactory.COURIER_BOLDOBLIQUE, 10.5f)));
expert_shoulder.setRowspan(6);
table.addCell(expert_shoulder);
Cell expert_shoulder1 = new Cell(new Paragraph(expertBean.getShoulder().trim(),FontFactory.getFont(FontFactory.COURIER_BOLDOBLIQUE, 10.5f)));
expert_shoulder1.setRowspan(6);
expert_shoulder1.setColspan(5);
table.addCell(expert_shoulder1);
Cell re = new Cell(new Paragraph("备注",FontFactory.getFont(FontFactory.COURIER_BOLDOBLIQUE, 10.5f)));
re.setRowspan(6);
table.addCell(re);
Cell re1 = new Cell(new Paragraph(expertBean.getRe().trim(),FontFactory.getFont(FontFactory.COURIER_BOLDOBLIQUE, 10.5f)));
re1.setRowspan(6);
re1.setColspan(5);
table.addCell(re1);
document.add(table);
document.close();
output.close();
System.gc();
document.add(table);
这句话有问题