摘要: IText生成doc文档需要三个包:iTextAsian.jar,iText-rtf-2.1.4.jar,iText-2.1.4.jar亲测无误,代码如下所示:import com.lowagie.text.*;import com.lowagie.text.Font;import com.lowagie.text.Rectangle;import com.lowagie.text.pdf.BaseFont;import com.lowagie.text.pdf.PdfPCell;import com.lowagie.text.pdf.PdfPTable;import com.lowagie. 阅读全文
posted @ 2013-08-04 19:21 无忧之路 阅读(796) 评论(0) 推荐(0) 编辑
摘要: IText生成doc文档需要三个包:iTextAsian.jar,iText-rtf-2.1.4.jar,iText-2.1.4.jar亲测无误,代码如下:import com.lowagie.text.*;import com.lowagie.text.Rectangle;import com.lowagie.text.rtf.RtfWriter2;import java.io.FileOutputStream;/** * 纸张方向横向测试 * User: HYY * Date: 13-8-1 * Time: 下午9:54 * To change this template use File 阅读全文
posted @ 2013-08-04 19:17 无忧之路 阅读(909) 评论(0) 推荐(1) 编辑
摘要: 昨晚寻找了网上很多关于IText表格居中问题,他们其中的有些代码我即使复制上去生成的doc表格的文字都是不居中的,后来我自己找出了一种居中方式:为PdfPCell对象添加paragraph对象,并将该paragraph设置为居中: PdfPCell cell1 = new PdfPCell(); Paragraph para = new Paragraph("该单元居中"); //设置该段落为居中显示 para.setAlignment(1); cell1.setPhrase(para); table.addCell(cell1);代码亲测无误,全部代码如下:import 阅读全文
posted @ 2013-08-04 19:14 无忧之路 阅读(18818) 评论(0) 推荐(1) 编辑
摘要: IText生成doc文档需要三个包:iTextAsian.jar,iText-rtf-2.1.4.jar,iText-2.1.4.jar亲测无误,代码如下:import com.lowagie.text.Document;import com.lowagie.text.Font;import com.lowagie.text.PageSize;import com.lowagie.text.Paragraph;import com.lowagie.text.pdf.BaseFont;import com.lowagie.text.rtf.RtfWriter2;import org.junit. 阅读全文
posted @ 2013-08-04 19:01 无忧之路 阅读(781) 评论(0) 推荐(1) 编辑
摘要: 做doc文档报表的时候可能遇到这样的需求:每一个页面需要页码,用IText可以完成这样的需求。IText生成doc文档需要三个包:iTextAsian.jar,iText-rtf-2.1.4.jar,iText-2.1.4.jar代码亲测无错,如下所示:import com.lowagie.text.*;import com.lowagie.text.Font;import com.lowagie.text.rtf.RtfWriter2;import java.awt.*;import java.io.FileOutputStream;/*** 生成页脚页码* User: HYY* Date: 阅读全文
posted @ 2013-08-04 18:55 无忧之路 阅读(3954) 评论(0) 推荐(0) 编辑
摘要: javascript函数的参数包含另一个函数的情形:运行结果:第一次弹出窗口:1第二次弹出窗口:函数a结论:在javascript中,函数的参数可以为另一个函数的引用 阅读全文
posted @ 2013-08-04 18:38 无忧之路 阅读(953) 评论(0) 推荐(0) 编辑
摘要: struts2配置文件中action的name属性的第一个字符不要加斜杠 /admin/business/baoxiuManage/see.jsp如果name="/see"则是错误的写法。 阅读全文
posted @ 2013-08-04 18:30 无忧之路 阅读(986) 评论(0) 推荐(0) 编辑
摘要: 如果t_message表和t_user_has_message表通过字段id和messageId相关联,并且打算删除这两张表拥有共同关联id的数据,可以使用SQL语句:DELETE m, uhm FROM t_message AS m, t_user_has_message AS uhm WHERE uhm.messageId = m.id AND m.id IN (1,2,3)即可删除两表的且id为1,2,3的数据 阅读全文
posted @ 2013-08-04 18:26 无忧之路 阅读(531) 评论(0) 推荐(0) 编辑
无忧之路