iText的使用例子说明(利用Itext画模板导出word、pdf,纯java实现)

最近项目中要用到导出word这个功能,大概研究了一些实现方式。jacob,poi,jodconvert,jspperreport,itext等等,jacob是连接java和com的桥,因为用的IBM的小型机,所以用的是AIX操作系统,不支持,故砍掉;poi调整word格式太麻烦了,而且会有问题,砍掉;jodconvert基于openoffice,砍掉;jspperreport,利用ireport画模板太累,砍掉;最终确定下来用itext,itext提供的java类库还是比较全面的。 
一下是代码和所需jar包(需要引入iText-2.1.7.jar;iTextAsian.jar;iText-rtf-2.1.7.jar) 
Java代码   收藏代码
  1. import java.awt.Color;  
  2. import java.io.FileOutputStream;  
  3. import java.io.IOException;  
  4. import java.net.MalformedURLException;  
  5.   
  6. import com.lowagie.text.Cell;  
  7. import com.lowagie.text.Document;  
  8. import com.lowagie.text.DocumentException;  
  9. import com.lowagie.text.Element;  
  10. import com.lowagie.text.Font;  
  11. import com.lowagie.text.Image;  
  12. import com.lowagie.text.PageSize;  
  13. import com.lowagie.text.Paragraph;  
  14. import com.lowagie.text.Phrase;  
  15. import com.lowagie.text.Table;  
  16. import com.lowagie.text.pdf.BaseFont;  
  17. import com.lowagie.text.rtf.RtfWriter2;  
  18.   
  19. /** 
  20.  * 根据itext提供的java类库,构建word模板,并添加相应的内容,从而导出word报告;平台不相关 
  21.  * 需要引入iText-2.1.7.jar;iTextAsian.jar;iText-rtf-2.1.7.jar 
  22.  *  
  23.  * @author ryan 
  24.  */  
  25. public class WordTemplete {  
  26.     private Document document;  
  27.     private BaseFont bfChinese;  
  28.     public BaseFont getBfChinese() {  
  29.         return bfChinese;  
  30.     }  
  31.   
  32.     public void setBfChinese(BaseFont bfChinese) {  
  33.         this.bfChinese = bfChinese;  
  34.     }  
  35.   
  36.     public Document getDocument() {  
  37.         return document;  
  38.     }  
  39.   
  40.     public void setDocument(Document document) {  
  41.         this.document = document;  
  42.     }  
  43.   
  44.     public WordTemplete(){  
  45.         this.document = new Document(PageSize.A4);  
  46.           
  47.     }  
  48.     /** 
  49.      * @param filePath 建立一个书写器(Writer)与document对象关联,通过书写器(Writer)可以将文档写入到磁盘中 
  50.      * @throws DocumentException 
  51.      * @throws IOException 
  52.      */  
  53.     public void openDocument(String filePath) throws DocumentException,  
  54.     IOException {  
  55. //       建立一个书写器(Writer)与document对象关联,通过书写器(Writer)可以将文档写入到磁盘中  
  56.         RtfWriter2.getInstance(this.document, new FileOutputStream(filePath));  
  57.         this.document.open();  
  58. //       设置中文字体  
  59.         this.bfChinese = BaseFont.createFont("STSongStd-Light",  
  60.                 "UniGB-UCS2-H", BaseFont.NOT_EMBEDDED);  
  61.     }  
  62.       
  63.     /** 
  64.      * @param titleStr 标题 
  65.      * @param fontsize 字体大小 
  66.      * @param fontStyle 字体样式 
  67.      * @param elementAlign 对齐方式 
  68.      * @throws DocumentException 
  69.      */  
  70.     public void insertTitle(String titleStr,int fontsize,int fontStyle,int elementAlign) throws DocumentException{  
  71.         Font titleFont = new Font(this.bfChinese, fontsize, fontStyle);  
  72.         Paragraph title = new Paragraph(titleStr);  
  73.         // 设置标题格式对齐方式  
  74.         title.setAlignment(elementAlign);  
  75.         title.setFont(titleFont);  
  76.           
  77.         this.document.add(title);  
  78.     }  
  79.       
  80.     /** 
  81.      * @param contextStr 内容 
  82.      * @param fontsize 字体大小 
  83.      * @param fontStyle 字体样式 
  84.      * @param elementAlign 对齐方式 
  85.      * @throws DocumentException  
  86.      */  
  87.     public void insertContext(String contextStr,int fontsize,int fontStyle,int elementAlign) throws DocumentException{  
  88.         // 正文字体风格  
  89.         Font contextFont = new Font(bfChinese, fontsize, fontStyle);  
  90.         Paragraph context = new Paragraph(contextStr);  
  91.         //设置行距  
  92.         context.setLeading(30f);  
  93.         // 正文格式左对齐  
  94.         context.setAlignment(elementAlign);  
  95.         context.setFont(contextFont);  
  96.         // 离上一段落(标题)空的行数  
  97.         context.setSpacingBefore(5);  
  98.         // 设置第一行空的列数  
  99.         context.setFirstLineIndent(20);  
  100.         document.add(context);  
  101.     }  
  102.     /* 
  103.      * 测试清单 
  104.      * */  
  105.     public  void insertRiskTable() throws DocumentException{  
  106.         Table aTable = new Table(6,3);  
  107.         int width[] = { 104017131010 };  
  108.         aTable.setWidths(width);// 设置每列所占比例  
  109.         aTable.setWidth(100); // 占页面宽度 90%  
  110.         aTable.setAlignment(Element.ALIGN_CENTER);// 居中显示  
  111.         aTable.setAlignment(Element.ALIGN_MIDDLE);// 纵向居中显示  
  112.         aTable.setAutoFillEmptyCells(true); // 自动填满  
  113.         aTable.setBorderWidth(0); // 边框宽度  
  114.         aTable.setBorderColor(new Color(0125255)); // 边框颜色  
  115.         aTable.setPadding(2);// 衬距,看效果就知道什么意思了  
  116.         aTable.setSpacing(3);// 即单元格之间的间距  
  117.         aTable.setBorder(2);// 边框  
  118.           
  119.         Font fontChinese = new Font(bfChinese, 10, Font.BOLD);  
  120.         Cell cell = new Cell(new Phrase("\n测试代码\n", fontChinese));  
  121.         cell.setVerticalAlignment(Element.ALIGN_CENTER);  
  122.         cell.setHorizontalAlignment(Element.ALIGN_CENTER);  
  123.         cell.setBorderColor(new Color(000));  
  124.         cell.setBackgroundColor(new Color(153204255));  
  125.         aTable.addCell(cell);  
  126.           
  127.         Cell cell1 = new Cell(new Phrase("测试名称", fontChinese));  
  128.         cell1.setVerticalAlignment(Element.ALIGN_CENTER);  
  129.         cell1.setHorizontalAlignment(Element.ALIGN_CENTER);  
  130.         cell1.setBorderColor(new Color(000));  
  131.         cell1.setBackgroundColor(new Color(153204255));  
  132.         aTable.addCell(cell1);  
  133.           
  134.         Cell cell2 = new Cell(new Phrase("测试发生可能性", fontChinese));  
  135.         cell2.setVerticalAlignment(Element.ALIGN_CENTER);  
  136.         cell2.setHorizontalAlignment(Element.ALIGN_CENTER);  
  137.         cell2.setBorderColor(new Color(000));  
  138.         cell2.setBackgroundColor(new Color(2552550));  
  139.         aTable.addCell(cell2);  
  140.           
  141.         Cell cell3 = new Cell(new Phrase("测试损失度", fontChinese));  
  142.         cell3.setVerticalAlignment(Element.ALIGN_CENTER);  
  143.         cell3.setHorizontalAlignment(Element.ALIGN_CENTER);  
  144.         cell3.setBorderColor(new Color(000));  
  145.         cell3.setBackgroundColor(new Color(2552550));  
  146.         aTable.addCell(cell3);  
  147.           
  148.         Cell cell4 = new Cell(new Phrase("测试水平", fontChinese));  
  149.         cell4.setVerticalAlignment(Element.ALIGN_CENTER);  
  150.         cell4.setHorizontalAlignment(Element.ALIGN_CENTER);  
  151.         cell4.setBorderColor(new Color(000));  
  152.         cell4.setBackgroundColor(new Color(2552550));  
  153.         aTable.addCell(cell4);  
  154.           
  155.         Cell cell5 = new Cell(new Phrase("测试等级", fontChinese));  
  156.         cell5.setVerticalAlignment(Element.ALIGN_CENTER);  
  157.         cell5.setHorizontalAlignment(Element.ALIGN_CENTER);  
  158.         cell5.setBorderColor(new Color(000));  
  159.         cell5.setBackgroundColor(new Color(2552550));  
  160.         aTable.addCell(cell5);  
  161.           
  162.         for(int i=0;i<12;i++){  
  163.             aTable.addCell(new Cell(i+""));  
  164.         }         
  165.         document.add(aTable);  
  166.         document.add(new Paragraph("\n"));    
  167.     }  
  168.     /* 
  169.      * 现状评估 
  170.      * */  
  171.     public void insertRiskEvaluationTable() throws DocumentException{  
  172.         Table aTable = new Table(12,4);  
  173.         int width1[] = { 52052055555555};  
  174.         aTable.setWidths(width1);// 设置每列所占比例  
  175.         aTable.setWidth(100); // 占页面宽度 90%  
  176.         aTable.setAlignment(Element.ALIGN_CENTER);// 居中显示  
  177.         aTable.setAlignment(Element.ALIGN_MIDDLE);// 纵向居中显示  
  178.         aTable.setAutoFillEmptyCells(true); // 自动填满  
  179.         aTable.setBorderWidth(0); // 边框宽度  
  180.         aTable.setBorderColor(new Color(0125255)); // 边框颜色  
  181.           
  182.         Font fontChinese = new Font(bfChinese, 10, Font.BOLD);  
  183.         Cell cell = new Cell(new Phrase("\n测试代码\n", fontChinese));  
  184.         cell.setVerticalAlignment(Element.ALIGN_CENTER);  
  185.         cell.setHorizontalAlignment(Element.ALIGN_CENTER);  
  186.         cell.setRowspan(2);  
  187.         cell.setBorderColor(new Color(000));  
  188.         cell.setBackgroundColor(new Color(153204255));  
  189.         aTable.addCell(cell);  
  190.           
  191.         Cell cell2 = new Cell(new Phrase("测试名称", fontChinese));  
  192.         cell2.setVerticalAlignment(Element.ALIGN_CENTER);  
  193.         cell2.setHorizontalAlignment(Element.ALIGN_CENTER);  
  194.         cell2.setRowspan(2);  
  195.         cell2.setBorderColor(new Color(000));  
  196.         cell2.setBackgroundColor(new Color(153204255));  
  197.         aTable.addCell(cell2);  
  198.           
  199.         Cell cell3 = new Cell(new Phrase("行为代码", fontChinese));  
  200.         cell3.setVerticalAlignment(Element.ALIGN_CENTER);  
  201.         cell3.setHorizontalAlignment(Element.ALIGN_CENTER);  
  202.         cell3.setRowspan(2);  
  203.         cell3.setBorderColor(new Color(000));  
  204.         cell3.setBackgroundColor(new Color(153204255));  
  205.         aTable.addCell(cell3);  
  206.           
  207.         Cell cell4 = new Cell(new Phrase("引发测试的行为", fontChinese));  
  208.         cell4.setVerticalAlignment(Element.ALIGN_CENTER);  
  209.         cell4.setHorizontalAlignment(Element.ALIGN_CENTER);  
  210.         cell4.setRowspan(2);  
  211.         cell4.setBorderColor(new Color(000));  
  212.         cell4.setBackgroundColor(new Color(153204255));  
  213.         aTable.addCell(cell4);  
  214.           
  215.         Cell cell5 = new Cell(new Phrase("控制现状", fontChinese));  
  216.         cell5.setVerticalAlignment(Element.ALIGN_CENTER);  
  217.         cell5.setHorizontalAlignment(Element.ALIGN_CENTER);  
  218.         cell5.setColspan(8);  
  219.         cell5.setBorderColor(new Color(000));  
  220.         cell5.setBackgroundColor(new Color(204255255));  
  221.         aTable.addCell(cell5);  
  222.           
  223.         Cell cell6 = new Cell(new Phrase("部门内审查", fontChinese));  
  224.         cell6.setVerticalAlignment(Element.ALIGN_CENTER);  
  225.         cell6.setHorizontalAlignment(Element.ALIGN_CENTER);  
  226.         cell6.setBorderColor(new Color(000));  
  227.         cell6.setBackgroundColor(new Color(204255255));  
  228.         aTable.addCell(cell6);  
  229.           
  230.         Cell cell7 = new Cell(new Phrase("测试意识", fontChinese));  
  231.         cell7.setVerticalAlignment(Element.ALIGN_CENTER);  
  232.         cell7.setHorizontalAlignment(Element.ALIGN_CENTER);  
  233.         cell7.setBorderColor(new Color(000));  
  234.         cell7.setBackgroundColor(new Color(204255255));  
  235.         aTable.addCell(cell7);  
  236.   
  237.         Cell cell8 = new Cell(new Phrase("过程监控", fontChinese));  
  238.         cell8.setVerticalAlignment(Element.ALIGN_CENTER);  
  239.         cell8.setHorizontalAlignment(Element.ALIGN_CENTER);  
  240.         cell8.setBorderColor(new Color(000));  
  241.         cell8.setBackgroundColor(new Color(204255255));  
  242.         aTable.addCell(cell8);  
  243.           
  244.         Cell cell9 = new Cell(new Phrase("奖惩机制", fontChinese));  
  245.         cell9.setVerticalAlignment(Element.ALIGN_CENTER);  
  246.         cell9.setHorizontalAlignment(Element.ALIGN_CENTER);  
  247.         cell9.setBorderColor(new Color(000));  
  248.         cell9.setBackgroundColor(new Color(204255255));  
  249.         aTable.addCell(cell9);  
  250.           
  251.         Cell cell10 = new Cell(new Phrase("明确责权", fontChinese));  
  252.         cell10.setVerticalAlignment(Element.ALIGN_CENTER);  
  253.         cell10.setHorizontalAlignment(Element.ALIGN_CENTER);  
  254.         cell10.setBorderColor(new Color(000));  
  255.         cell10.setBackgroundColor(new Color(204255255));  
  256.         aTable.addCell(cell10);  
  257.           
  258.         Cell cell11 = new Cell(new Phrase("执行者能力要求", fontChinese));  
  259.         cell11.setVerticalAlignment(Element.ALIGN_CENTER);  
  260.         cell11.setHorizontalAlignment(Element.ALIGN_CENTER);  
  261.         cell11.setBorderColor(new Color(000));  
  262.         cell11.setBackgroundColor(new Color(204255255));  
  263.         aTable.addCell(cell11);  
  264.           
  265.         Cell cell12 = new Cell(new Phrase("专业审查", fontChinese));  
  266.         cell12.setVerticalAlignment(Element.ALIGN_CENTER);  
  267.         cell12.setHorizontalAlignment(Element.ALIGN_CENTER);  
  268.         cell12.setBorderColor(new Color(000));  
  269.         cell12.setBackgroundColor(new Color(204255255));  
  270.         aTable.addCell(cell12);  
  271.           
  272.         Cell cell13 = new Cell(new Phrase("资源配置", fontChinese));  
  273.         cell13.setVerticalAlignment(Element.ALIGN_CENTER);  
  274.         cell13.setHorizontalAlignment(Element.ALIGN_CENTER);  
  275.         cell13.setBorderColor(new Color(000));  
  276.         cell13.setBackgroundColor(new Color(204255255));  
  277.         aTable.addCell(cell13);  
  278.           
  279.         for(int i=0;i<24;i++){  
  280.             aTable.addCell(new Cell(i+""));  
  281.         }  
  282.           
  283.         document.add(aTable);  
  284.         document.add(new Paragraph("\n"));  
  285.     }  
  286.       
  287.     /* 
  288.      * 测试控制清单 
  289.      * */  
  290.     public  void insertRiskControlTable() throws DocumentException{  
  291.         Table aTable = new Table(11,3);  
  292.         int width[] = { 5135991399999 };  
  293.         aTable.setWidths(width);// 设置每列所占比例  
  294.         aTable.setWidth(100); // 占页面宽度 90%  
  295.         aTable.setAlignment(Element.ALIGN_CENTER);// 居中显示  
  296.         aTable.setAlignment(Element.ALIGN_MIDDLE);// 纵向居中显示  
  297.         aTable.setAutoFillEmptyCells(true); // 自动填满  
  298.         aTable.setBorderWidth(0); // 边框宽度  
  299.         aTable.setBorderColor(new Color(0125255)); // 边框颜色  
  300.           
  301.         Font fontChinese = new Font(bfChinese, 10, Font.BOLD);  
  302.         Cell cell = new Cell(new Phrase("\n测试代码\n", fontChinese));  
  303.         cell.setVerticalAlignment(Element.ALIGN_CENTER);  
  304.         cell.setHorizontalAlignment(Element.ALIGN_CENTER);  
  305.         cell.setBorderColor(new Color(000));  
  306.         cell.setBackgroundColor(new Color(204153255));  
  307.         aTable.addCell(cell);  
  308.           
  309.         Cell cell1 = new Cell(new Phrase("测试名称", fontChinese));  
  310.         cell1.setVerticalAlignment(Element.ALIGN_CENTER);  
  311.         cell1.setHorizontalAlignment(Element.ALIGN_CENTER);  
  312.         cell1.setBorderColor(new Color(000));  
  313.         cell1.setBackgroundColor(new Color(204153255));  
  314.         aTable.addCell(cell1);  
  315.           
  316.         Cell cell2 = new Cell(new Phrase("行为代码", fontChinese));  
  317.         cell2.setVerticalAlignment(Element.ALIGN_CENTER);  
  318.         cell2.setHorizontalAlignment(Element.ALIGN_CENTER);  
  319.         cell2.setBorderColor(new Color(000));  
  320.         cell2.setBackgroundColor(new Color(204153255));  
  321.         aTable.addCell(cell2);  
  322.           
  323.         Cell cell3 = new Cell(new Phrase("引发测试的行为", fontChinese));  
  324.         cell3.setVerticalAlignment(Element.ALIGN_CENTER);  
  325.         cell3.setBorderColor(new Color(000));  
  326.         cell3.setBackgroundColor(new Color(204153255));  
  327.         aTable.addCell(cell3);  
  328.           
  329.         Cell cell4 = new Cell(new Phrase("测试控制态度", fontChinese));  
  330.         cell4.setVerticalAlignment(Element.ALIGN_CENTER);  
  331.         cell4.setHorizontalAlignment(Element.ALIGN_CENTER);  
  332.         cell4.setBorderColor(new Color(000));  
  333.         cell4.setBackgroundColor(new Color(204153255));  
  334.         aTable.addCell(cell4);  
  335.           
  336.         Cell cell5 = new Cell(new Phrase("控制措施", fontChinese));  
  337.         cell5.setVerticalAlignment(Element.ALIGN_CENTER);  
  338.         cell5.setHorizontalAlignment(Element.ALIGN_CENTER);  
  339.         cell5.setBorderColor(new Color(000));  
  340.         cell5.setBackgroundColor(new Color(204153255));  
  341.         aTable.addCell(cell5);  
  342.           
  343.         Cell cell6 = new Cell(new Phrase("措施类型", fontChinese));  
  344.         cell6.setVerticalAlignment(Element.ALIGN_CENTER);  
  345.         cell6.setHorizontalAlignment(Element.ALIGN_CENTER);  
  346.         cell6.setBorderColor(new Color(000));  
  347.         cell6.setBackgroundColor(new Color(204153255));  
  348.         aTable.addCell(cell6);  
  349.           
  350.         Cell cell7 = new Cell(new Phrase("完成标志", fontChinese));  
  351.         cell7.setVerticalAlignment(Element.ALIGN_CENTER);  
  352.         cell7.setHorizontalAlignment(Element.ALIGN_CENTER);  
  353.         cell7.setBorderColor(new Color(000));  
  354.         cell7.setBackgroundColor(new Color(204153255));  
  355.         aTable.addCell(cell7);  
  356.           
  357.         Cell cell8 = new Cell(new Phrase("控制措施完成时间", fontChinese));  
  358.         cell8.setVerticalAlignment(Element.ALIGN_CENTER);  
  359.         cell8.setHorizontalAlignment(Element.ALIGN_CENTER);  
  360.         cell8.setBorderColor(new Color(000));  
  361.         cell8.setBackgroundColor(new Color(204153255));  
  362.         aTable.addCell(cell8);  
  363.           
  364.         Cell cell9 = new Cell(new Phrase("控制措施牵头部门", fontChinese));  
  365.         cell9.setVerticalAlignment(Element.ALIGN_CENTER);  
  366.         cell9.setHorizontalAlignment(Element.ALIGN_CENTER);  
  367.         cell9.setBorderColor(new Color(000));  
  368.         cell9.setBackgroundColor(new Color(204153255));  
  369.         aTable.addCell(cell9);  
  370.           
  371.         Cell cell10 = new Cell(new Phrase("控制措施配合部门", fontChinese));  
  372.         cell10.setVerticalAlignment(Element.ALIGN_CENTER);  
  373.         cell10.setHorizontalAlignment(Element.ALIGN_CENTER);  
  374.         cell10.setBorderColor(new Color(000));  
  375.         cell10.setBackgroundColor(new Color(204153255));  
  376.         aTable.addCell(cell10);  
  377.           
  378.         for(int i=0;i<22;i++){  
  379.             aTable.addCell(new Cell(i+""));  
  380.         }  
  381.           
  382.           
  383.         document.add(aTable);  
  384.         document.add(new Paragraph("\n"));  
  385.           
  386.     }  
  387.       
  388.     /** 
  389.      * @param imgUrl 图片路径 
  390.      * @param imageAlign 显示位置 
  391.      * @param height 显示高度 
  392.      * @param weight 显示宽度 
  393.      * @param percent 显示比例 
  394.      * @param heightPercent 显示高度比例 
  395.      * @param weightPercent 显示宽度比例 
  396.      * @param rotation 显示图片旋转角度 
  397.      * @throws MalformedURLException 
  398.      * @throws IOException 
  399.      * @throws DocumentException 
  400.      */  
  401.     public void insertImg(String imgUrl,int imageAlign,int height,int weight,int percent,int heightPercent,int weightPercent,int rotation) throws MalformedURLException, IOException, DocumentException{  
  402. //       添加图片  
  403.         Image img = Image.getInstance(imgUrl);  
  404.         if(img==null)  
  405.             return;  
  406.         img.setAbsolutePosition(00);  
  407.         img.setAlignment(imageAlign);  
  408.         img.scaleAbsolute(height, weight);  
  409.         img.scalePercent(percent);  
  410.         img.scalePercent(heightPercent, weightPercent);  
  411.         img.setRotation(rotation);  
  412.   
  413.         document.add(img);  
  414.     }  
  415.       
  416.     public void closeDocument() throws DocumentException{  
  417.         this.document.close();  
  418.     }  
  419.       
  420.     public static void main(String[] args) throws DocumentException, IOException {  
  421.         WordTemplete wt = new WordTemplete();  
  422.         wt.openDocument("d:\\dome1.doc");  
  423.         wt.insertTitle("一、测试基本情况"12, Font.BOLD, Element.ALIGN_CENTER);  
  424.           
  425.         wt.insertContext("共识别出XXX个测试,XXX项测试行为,其中,违规类测试XX项,占测试总量的XX%,违约类测试XX项,占测试总量的XX%,侵权类测试XX项,占测试总量的XX%,怠于类测试XX项,占测试总量的XX%,不当类测试XX项,占测试总量的XX%。"12, Font.NORMAL, Element.ALIGN_LEFT);  
  426.         wt.insertContext("根据测试测评结果,各等级测试数量及所占百分比分别为:一级测试共XX项,占测试总量的XX%;二级测试共XX项,占测试总量的XX%;三级测试共XX项,占测试总量的XX%;四级测试共XX项,占测试总量的XX%;五级测试共XX项,占测试总量的XX%。\n\n"12, Font.NORMAL, Element.ALIGN_LEFT);  
  427.           
  428.         wt.insertContext("测试定向分析结果如下:"12, Font.NORMAL, Element.ALIGN_LEFT);  
  429.           
  430.         wt.insertContext("① 部门角度测试分析"12, Font.NORMAL, Element.ALIGN_LEFT);  
  431.         wt.insertImg("test.bmp", Image.ALIGN_CENTER, 123550505030);  
  432.         wt.insertContext("② 主体角度测试分析"12, Font.NORMAL, Element.ALIGN_LEFT);  
  433.         wt.insertImg("test.bmp", Image.ALIGN_CENTER, 123550606030);  
  434.         wt.insertContext("③ 部门主体交叉角度测试分析"12, Font.NORMAL, Element.ALIGN_LEFT);  
  435.         wt.insertImg("test.bmp", Image.ALIGN_CENTER, 507510010010030);  
  436.         wt.insertContext("④ 业务活动角度测试分析"12, Font.NORMAL, Element.ALIGN_LEFT);  
  437.         wt.insertImg("test.bmp", Image.ALIGN_CENTER, 123550808030);  
  438.           
  439.         wt.insertTitle("二、重大测试清单"12, Font.BOLD, Element.ALIGN_CENTER);  
  440.         wt.insertRiskTable();  
  441.         wt.insertTitle("三、测试控制现状评估结果"12, Font.BOLD, Element.ALIGN_CENTER);  
  442.         wt.insertRiskEvaluationTable();  
  443.         wt.insertTitle("四、测试控制计划"12, Font.BOLD, Element.ALIGN_CENTER);  
  444.         wt.insertRiskControlTable();  
  445.         wt.closeDocument();  
  446.     }  
  447. }  
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值