导航:首页 > 编程语言 > java极限编程pdf

java极限编程pdf

发布时间:2024-03-29 14:05:20

⑴ 如何运用java组件itext生成pdf

首先从iText的官网下载这个开源的小组件。
iText官方网站
Java版iText组件
Java版工具包
C#版iText组件
C#版工具包
这里笔者使用的是Java版itext-5.2.1。
将itext-5.2.1.zip压缩解压缩后得到7个文件:itextpdf-5.2.1.jar(核心组件)、itextpdf-5.2.1-javadoc.jar(API文档)、itextpdf-5.2.1-sources.jar(源代码)、itext-xtra-5.2.1.jar、itext-xtra-5.2.1-javadoc.jar、itext-xtra-5.2.1-sources.jar
使用5步即可生成一个简单的PDF文档。
复制代码
1 // 1.创建 Document 对象
2 Document _document = new Document();
3 // 2.创建书写器,通过书写器将文档写入磁盘
4 PdfWriter _pdfWriter = PdfWriter.getInstance(_document, new FileOutputStream("生成文件的路径"));
5 // 3.打开文档
6 _document.open();
7 // 4.向文档中添加内容
8 _document.add(new Paragraph("Hi"));
9 // 5.关闭文档
10 _document.close();
复制代码
OK,搞定,不出问题的话就会在你指定的路径中生成一个PDF文档,内容是纯文本的“Hi”。
可是这样并不能完全满足我们的需求,因为通常我们要生成的PDF文件不一定是纯文本格式的,比如我现在要实现打印销售单的功能,那么最起码需要绘制表格才行,怎么办呢?且跟笔者继续向下研究。
在iText中,有专门的表格类,即PdfPTable类。笔者做了一个简单的表格示例,请先看代码:
复制代码
1 OutTradeList _otl = this.getOtlBiz().findOutTradeListById(this.getOtlid());
2 String _fileName = _otl.getOtlId() + ".pdf";
3
4 // iText 处理中文
5 BaseFont _baseFont = BaseFont.createFont("STSongStd-Light", "UniGB-UCS2-H", true);
6 // 1.创建 Document 对象
7 Document _document = new Document(PageSize.A4);
8
9 HttpServletResponse response = ServletActionContext.getResponse();
10 response.setContentType("application/pdf; charset=ISO-8859-1");
11 response.setHeader("Content-Disposition", "inline; filename=" + new String(_fileName.getBytes(), "iso8859-1"));
12
13 // 2.创建书写器,通过书写器将文档写入磁盘
14 PdfWriter _pdfWriter = null;
15 try {
16 _pdfWriter = PdfWriter.getInstance(_document, response.getOutputStream());
17 } catch (Exception e) {
18 this.setMessage("单据生成失败,请检查服务器目录权限配置是否正确");
19 e.printStackTrace();
20 System.out.println("2.挂了");
21 // return INPUT;
22 return null;
23 }
24 if(_pdfWriter == null) {
25 this.setMessage("单据生成失败,请检查服务器目录权限配置是否正确");
26 System.out.println("3.挂了");
27 // return INPUT;
28 return null;
29 }
30
31 // 3.打开文档
32 _document.open();
33
34 // 4.创建需要填入文档的元素
35 PdfPTable _table = new PdfPTable(4);
36 PdfPCell _cell = null;
37
38 _table.addCell(new Paragraph("单据号", new Font(_baseFont)));
39 _cell = new PdfPCell(new Paragraph(_otl.getOtlId()));
40 _cell.setColspan(3);
41 _table.addCell(_cell);
42
43 _table.addCell(new Paragraph("客户名称", new Font(_baseFont)));
44 _cell = new PdfPCell(new Paragraph(_otl.getClients().getName(), new Font(_baseFont)));
45 _cell.setColspan(3);
46 _table.addCell(_cell);
47
48 _table.addCell(new Paragraph("销售日期", new Font(_baseFont)));
49 _cell = new PdfPCell(new Paragraph(_otl.getOutDate().toString()));
50 _cell.setColspan(3);
51 _table.addCell(_cell);
52
53 _cell = new PdfPCell();
54 _cell.setColspan(4);
55 PdfPTable _tabGoods = new PdfPTable(7);
56 // 添加标题行
57 _tabGoods.setHeaderRows(1);
58 _tabGoods.addCell(new Paragraph("序号", new Font(_baseFont)));
59 _tabGoods.addCell(new Paragraph("商品名称", new Font(_baseFont)));
60 _tabGoods.addCell(new Paragraph("自定义码", new Font(_baseFont)));
61 _tabGoods.addCell(new Paragraph("规格", new Font(_baseFont)));
62 _tabGoods.addCell(new Paragraph("数量", new Font(_baseFont)));
63 _tabGoods.addCell(new Paragraph("单价", new Font(_baseFont)));
64 _tabGoods.addCell(new Paragraph("小计", new Font(_baseFont)));
65 Object[] _outTrades = _otl.getOutTrades().toArray();
66 // 将商品销售详细信息加入表格
67 for(int i = 0; i < _outTrades.length;) {
68 if((_outTrades[i] != null) && (_outTrades[i] instanceof OutTrade)) {
69 OutTrade _ot = (OutTrade) _outTrades[i];
70 Goods _goods = _ot.getGoods();
71 _tabGoods.addCell(String.valueOf((++i)));
72 _tabGoods.addCell(new Paragraph(_goods.getName(), new Font(_baseFont)));
73 _tabGoods.addCell(_goods.getUserCode());
74 _tabGoods.addCell(_goods.getEtalon());
75 _tabGoods.addCell(String.valueOf(_ot.getNum()));
76 _tabGoods.addCell(String.valueOf(_ot.getPrice()));
77 _tabGoods.addCell(String.valueOf((_ot.getNum() * _ot.getPrice())));
78 }
79 }
80 _cell.addElement(_tabGoods);
81 _table.addCell(_cell);
82
83 _table.addCell(new Paragraph("总计", new Font(_baseFont)));
84 _cell = new PdfPCell(new Paragraph(_otl.getAllPrice().toString()));
85 _cell.setColspan(3);
86 _table.addCell(_cell);
87
88 _table.addCell(new Paragraph("操作员", new Font(_baseFont)));
89 _cell = new PdfPCell(new Paragraph(_otl.getProcure()));
90 _cell.setColspan(3);
91 _table.addCell(_cell);
92
93 // 5.向文档中添加内容,将表格加入文档中
94 _document.add(_table);
95
96 // 6.关闭文档
97 _document.close();
98 System.out.println(_fileName);
99 this.setPdfFilePath(_fileName);
100 System.out.println("3.搞定");
101 // return SUCCESS;
102 return null;
复制代码
以上代码是写在 Struts2 的 Action 中的,当用户发送了请求之后直接将生成的PDF文件用输出流写入到客户端,浏览器收到服务器的响应之后就会询问用户打开方式。
当然,我们也可以将文件写入磁盘等等。

⑵ java创建pdf文件写入不进去

通常需要用到用于读、写、编辑PDF文件的库,你可以参考下面采用spire.pdf.jar来创建PDF的步骤及方法:

  1. 首先需要引入jar包。具体的引入方法可以自行网络搜索。

  2. 创建PdfDocument类的对象,并通过PdfDocument.getPages().add()方法添加页码。

  3. 定义标题文字。

  4. 创建PdfSolidBrush画刷、PdfTrueTypeFont字体、PdfStringFormat字符串、Rectangle2D等对象,用于指定字符串绘制效果、字体、格式、绘制区域等。

  5. 通过PdfPageBase.getCanvas().drawString(body, font2, brush2, rect, format2)方法将内容绘制到PDF页面。

下面附上详细的代码demo示例:

import com.spire.pdf.*;

import com.spire.pdf.graphics.*;

import java.awt.*;

import java.awt.geom.*;

import java.io.*;

public class CreatePdfDocumentInJava {

public static void main(String[] args) throws FileNotFoundException, IOException {

//创建PdfDocument对象
PdfDocument doc = new PdfDocument();

//添加一页
PdfPageBase page = doc.getPages().add();

//标题文字
String title = "Java基础语法";

//创建单色画刷对象
PdfSolidBrush brush1 = new PdfSolidBrush(new PdfRGBColor(Color.BLUE));
PdfSolidBrush brush2 = new PdfSolidBrush(new PdfRGBColor(Color.BLACK));

//创建TrueType字体对象
PdfTrueTypeFont font1 = new PdfTrueTypeFont(new Font("宋体", Font.PLAIN, 14), true);
PdfTrueTypeFont font2 = new PdfTrueTypeFont(new Font("宋体", Font.PLAIN, 10), true);

//创建PdfStringFormat对象
PdfStringFormat format1 = new PdfStringFormat();
format1.setAlignment(PdfTextAlignment.Center);//设置文字居中

//使用drawString方法绘制标题文字
page.getCanvas().drawString(title, font1, brush1, new Point2D.Float((float) page.getActualBounds(true).getWidth() / 2, 0), format1);

//从txt文件读取内容到字符串
String body = readFileToString("C:\Users\Administrator\Desktop\bodyText.txt");

//创建PdfStringFormat对象
PdfStringFormat format2 = new PdfStringFormat();
format2.setParagraphIndent(20);//设置段首缩进

//创建Rectangle2D对象
Rectangle2D.Float rect = new Rectangle2D.Float(0, 30, (float) page.getActualBounds(true).getWidth(), (float) page.getActualBounds(true).getHeight());

//使用drawString方法在矩形区域绘制主体文字
page.getCanvas().drawString(body, font2, brush2, rect, format2);

//保存到PDF文档
doc.saveToFile("ouput.pdf");
}

//自定义方法读取txt文件内容到字符串
private static String readFileToString(String filepath) throws FileNotFoundException, IOException {

StringBuilder sb = new StringBuilder();
String s = "";
BufferedReader br = new BufferedReader(new FileReader(filepath));

while ((s = br.readLine()) != null) {
sb.append(s + " ");
}
br.close();
String str = sb.toString();
return str;
}

}

⑶ java解析pdf文件,求大神提供代码,请注意是java语言的

给你提供一个参考例子,你可以在这个例子上试试,修改修改。也是解析PDF的。

importjava.io.File;
importjava.io.FileOutputStream;
importjava.io.OutputStreamWriter;
importjava.io.Writer;
importjava.net.MalformedURLException;
importjava.net.URL;
importorg.apache.pdfbox.pdmodel.PDDocument;
importorg.apache.pdfbox.util.PDFTextStripper;
publicclassPdfReader{
publicvoidreadFdf(Stringfile)throwsException{
//是否排序
booleansort=false;
//pdf文件名
StringpdfFile=file;
//输入文本文件名称
StringtextFile=null;
//编码方式
Stringencoding="UTF-8";
//开始提取页数
intstartPage=1;
//结束提取页数
intendPage=Integer.MAX_VALUE;
//文件输入流,生成文本文件
Writeroutput=null;
//内存中存储的PDFDocument
PDDocumentdocument=null;
try{
try{
//首先当作一个URL来装载文件,如果得到异常再从本地文件系统//去装载文件
URLurl=newURL(pdfFile);
//注意参数已不是以前版本中的URL.而是File。
document=PDDocument.load(pdfFile);
//获取PDF的文件名
StringfileName=url.getFile();
//以原来PDF的名称来命名新产生的txt文件
if(fileName.length()>4){
FileoutputFile=newFile(fileName.substring(0,fileName
.length()-4)
+".txt");
textFile=outputFile.getName();
}
}catch(MalformedURLExceptione){
//如果作为URL装载得到异常则从文件系统装载
//注意参数已不是以前版本中的URL.而是File。
document=PDDocument.load(pdfFile);
if(pdfFile.length()>4){
textFile=pdfFile.substring(0,pdfFile.length()-4)
+".txt";
}
}
//文件输入流,写入文件倒textFile
output=newOutputStreamWriter(newFileOutputStream(textFile),
encoding);
//PDFTextStripper来提取文本
PDFTextStripperstripper=null;
stripper=newPDFTextStripper();
//设置是否排序
stripper.setSortByPosition(sort);
//设置起始页
stripper.setStartPage(startPage);
//设置结束页
stripper.setEndPage(endPage);
//调用PDFTextStripper的writeText提取并输出文本
stripper.writeText(document,output);
}finally{
if(output!=null){
//关闭输出流
output.close();
}
if(document!=null){
//关闭PDFDocument
document.close();
}
}
}
/**
*@paramargs
*/
publicstaticvoidmain(String[]args){
//TODOAuto-generatedmethodstub
PdfReaderpdfReader=newPdfReader();
try{
//取得E盘下的SpringGuide.pdf的内容
pdfReader.readFdf("d:\b.pdf");
}catch(Exceptione){
e.printStackTrace();
}
}
}

⑷ 如何运用Java组件itext生成pdf

实现流程:
一、iText介绍
iText是着名的开放源码的站点sourceforge一个项目,是用于生成PDF文档的一个java类库。通过iText不仅可以生成PDF或rtf的文档,而且可以将XML、Html文件转化为PDF文件。
二、建立第一个PDF文档
用iText生成PDF文档需要5个步骤:
①建立com.lowagie.text.Document对象的实例。
Document document = new Document();
②建立一个书写器(Writer)与document对象关联,通过书写器(Writer)可以将文档写入到磁盘中。
PDFWriter.getInstance(document, new FileOutputStream("Helloworld.PDF"));
③打开文档。
document.open();
④向文档中添加内容。
document.add(new Paragraph("Hello World"));
⑤关闭文档。
document.close();
通过上面的5个步骤,就能产生一个Helloworld.PDF的文件,文件内容为"Hello World"。
建立com.lowagie.text.Document对象的实例
com.lowagie.text.Document对象的构建函数有三个,分别是:
public Document();
public Document(Rectangle pageSize);
public Document(Rectangle pageSize,
int marginLeft,
int marginRight,
int marginTop,
int marginBottom);
构建函数的参数pageSize是文档页面的大小,对于第一个构建函数,页面的大小为A4,同Document(PageSize.A4)的效果一样;
对于第三个构建函数,参数marginLeft、marginRight、marginTop、marginBottom分别为左、右、上、下的页边距。
通过参数pageSize可以设定页面大小、面背景色、以及页面横向/纵向等属性。iText定义了A0-A10、AL、LETTER、
HALFLETTER、_11x17、LEDGER、NOTE、B0-B5、ARCH_A-ARCH_E、FLSA
和FLSE等纸张类型,也可以通过Rectangle pageSize = new Rectangle(144,
720);自定义纸张。通过Rectangle方法rotate()可以将页面设置成横向。
书写器(Writer)对象
一旦文档(document)对象建立好之后,需要建立一个或多个书写器(Writer)对象与之关联。通过书写器(Writer)对象可以将具体文档
存盘成需要的格式,如com.lowagie.text.PDF.PDFWriter可以将文档存成PDF文件,
com.lowagie.text.html.HtmlWriter可以将文档存成html文件。
设定文档属性
在文档打开之前,可以设定文档的标题、主题、作者、关键字、装订方式、创建者、生产者、创建日期等属性,调用的方法分别是:
public boolean addTitle(String title)
public boolean addSubject(String subject)
public boolean addKeywords(String keywords)
public boolean addAuthor(String author)
public boolean addCreator(String creator)
public boolean addProcer()
public boolean addCreationDate()
public boolean addHeader(String name, String content)
其中方法addHeader对于PDF文档无效,addHeader仅对html文档有效,用于添加文档的头信息。
当新的页面产生之前,可以设定页面的大小、书签、脚注(HeaderFooter)等信息,调用的方法是:
public boolean setPageSize(Rectangle pageSize)
public boolean add(Watermark watermark)
public void removeWatermark()
public void setHeader(HeaderFooter header)
public void resetHeader()
public void setFooter(HeaderFooter footer)
public void resetFooter()
public void resetPageCount()
public void setPageCount(int pageN)
如果要设定第一页的页面属性,这些方法必须在文档打开之前调用。
对于PDF文档,iText还提供了文档的显示属性,通过调用书写器的setViewerPreferences方法可以控制文档打开时Acrobat Reader的显示属性,如是否单页显示、是否全屏显示、是否隐藏状态条等属性。
另外,iText也提供了对PDF文件的安全保护,通过书写器(Writer)的setEncryption方法,可以设定文档的用户口令、只读、可打印等属性。
添加文档内容
所有向文档添加的内容都是以对象为单位的,如Phrase、Paragraph、Table、Graphic对象等。比较常用的是段落(Paragraph)对象,用于向文档中添加一段文字。
三、文本处理
iText中用文本块(Chunk)、短语(Phrase)和段落(paragraph)处理文本。
文本块(Chunk)是处理文本的最小单位,有一串带格式(包括字体、颜色、大小)的字符串组成。如以下代码就是产生一个字体为HELVETICA、大小为10、带下划线的字符串:
Chunk chunk1 = new Chunk("This text is underlined", FontFactory.getFont(FontFactory.HELVETICA, 12, Font.UNDERLINE));
短语(Phrase)由一个或多个文本块(Chunk)组成,短语(Phrase)也可以设定字体,但对于其中以设定过字体的文本块
(Chunk)无效。通过短语(Phrase)成员函数add可以将一个文本块(Chunk)加到短语(Phrase)中,
如:phrase6.add(chunk);
段落(paragraph)由一个或多个文本块(Chunk)或短语(Phrase)组
成,相当于WORD文档中的段落概念,同样可以设定段落的字体大小、颜色等属性。另外也可以设定段落的首行缩进、对齐方式(左对齐、右对齐、居中对齐)。
通过函数setAlignment可以设定段落的对齐方式, setAlignment的参数1为居中对齐、2为右对齐、3为左对齐,默认为左对齐。
四、表格处理
iText中处理表格的类为:com.lowagie.text.Table和com.lowagie.text.PDF.PDFPTable,对于比
较简单的表格处理可以用com.lowagie.text.Table,但是如果要处理复杂的表格,这就需要
com.lowagie.text.PDF.PDFPTable进行处理。这里就类com.lowagie.text.Table进行说明。
类com.lowagie.text.Table的构造函数有三个:
①Table (int columns)
②Table(int columns, int rows)
③Table(Properties attributes)
参数columns、rows、attributes分别为表格的列数、行数、表格属性。创建表格时必须指定表格的列数,而对于行数可以不用指定。
建立表格之后,可以设定表格的属性,如:边框宽度、边框颜色、衬距(padding space 即单元格之间的间距)大小等属性。下面通过一个简单的例子说明如何使用表格,代码如下:
1:Table table = new Table(3);
2:table.setBorderWidth(1);
3:table.setBorderColor(new Color(0, 0, 255));
4:table.setPadding(5);
5:table.setSpacing(5);
6:Cell cell = new Cell("header");
7:cell.setHeader(true);
8:cell.setColspan(3);
9:table.addCell(cell);
10:table.endHeaders();
11:cell = new Cell("example cell with colspan 1 and rowspan 2");
12:cell.setRowspan(2);
13:cell.setBorderColor(new Color(255, 0, 0));
14:table.addCell(cell);
15:table.addCell("1.1");
16:table.addCell("2.1");
17:table.addCell("1.2");
18:table.addCell("2.2");
19:table.addCell("cell test1");
20:cell = new Cell("big cell");
21:cell.setRowspan(2);
22:cell.setColspan(2);
23:table.addCell(cell);
24:table.addCell("cell test2");
运行结果如下:
header
example cell with colspan 1 and rowspan 2 1.1 2.1
1.2 2.2
cell test1 big cell
cell test2
代码1-5行用于新建一个表格,如代码所示,建立了一个列数为3的表格,并将边框宽度设为1,颜色为蓝色,衬距为5。
代码6-10行用于设定表格的表头,第7行cell.setHeader(true);是将该单元格作为表头信息显示;第8行
cell.setColspan(3);指定了该单元格占3列;为表格添加表头信息时,要注意的是一旦表头信息添加完了之后,必须调用
endHeaders()方法,如第10行,否则当表格跨页后,表头信息不会再显示。
代码11-14行是向表格中添加一个宽度占一列,长度占二行的单元格。
往表格中添加单元格(cell)时,按自左向右、从上而下的次序添加。如执行完11行代码后,表格的右下方出现2行2列的空白,这是再往表格添加单元格时,先填满这个空白,然后再另起一行,15-24行代码说明了这种添加顺序。
五、图像处理
iText中处理表格的类为com.lowagie.text.Image,目前iText支持的图像格式有:GIF, Jpeg, PNG,
wmf等格式,对于不同的图像格式,iText用同样的构造函数自动识别图像格式。通过下面的代码分别获得gif、jpg、png图像的实例。
Image gif = Image.getInstance("vonnegut.gif");
Image jpeg = Image.getInstance("myKids.jpg");
Image png = Image.getInstance("hitchcock.png");
图像的位置
图像的位置主要是指图像在文档中的对齐方式、图像和文本的位置关系。IText中通过函数public void setAlignment(int
alignment)进行处理,参数alignment为Image.RIGHT、Image.MIDDLE、Image.LEFT分别指右对齐、居中、
左对齐;当参数alignment为Image.TEXTWRAP、Image.UNDERLYING分别指文字绕图形显示、图形作为文字的背景显示。这
两种参数可以结合以达到预期的效果,如setAlignment(Image.RIGHT|Image.TEXTWRAP)显示的效果为图像右对齐,文字
围绕图像显示。
图像的尺寸和旋转
如果图像在文档中不按原尺寸显示,可以通过下面的函数进行设定:
public void scaleAbsolute(int newWidth, int newHeight)
public void scalePercent(int percent)
public void scalePercent(int percentX, int percentY)
函数public void scaleAbsolute(int newWidth, int
newHeight)直接设定显示尺寸;函数public void scalePercent(int
percent)设定显示比例,如scalePercent(50)表示显示的大小为原尺寸的50%;而函数scalePercent(int
percentX, int percentY)则图像高宽的显示比例。
如果图像需要旋转一定角度之后在文档中显示,可以通过函数public void setRotation(double r)设定,参数r为弧度,如果旋转角度为30度,则参数r= Math.PI / 6。
六、中文处理
默认的iText字体设置不支持中文字体,需要下载远东字体包iTextAsian.jar,否则不能往PDF文档中输出中文字体。通过下面的代码就可以在文档中使用中文了:
BaseFont bfChinese = BaseFont.createFont("STSong-Light", "UniGB-UCS2-H", BaseFont.NOT_EMBEDDED);
com.lowagie.text.Font FontChinese = new com.lowagie.text.Font(bfChinese, 12, com.lowagie.text.Font.NORMAL);
Paragraph pragraph=new Paragraph("你好", FontChinese);

⑸ java代码doc转pdf提高效率的方法

使用了jacob.jar来调用activex控件,本机需安装WPS或pdfcreator
001 package experiments;
002
003 import com.jacob.activeX.ActiveXComponent;
004 import com.jacob.com.Dispatch;
005 import com.jacob.com.DispatchEvents;
006 import com.jacob.com.Variant;
007 import java.io.File;
008 import java.util.logging.Level;
009 import java.util.logging.Logger;
010
011 public class Doc2Pdf {
012
013 public static Converter newConverter(String name) {
014 if (name.equals("wps")) {
015 return new Wps();
016 } else if (name.equals("pdfcreator")) {
017 return new PdfCreator();
018 }
019 return null;
020 }
021
022 public synchronized static boolean convert(String word, String pdf) {
023 return newConverter("pdfcreator").convert(word, pdf);
024 }
025
026 public static interface Converter {
027
028 public boolean convert(String word, String pdf);
029 }
030
031 public static class Wps implements Converter {
032
033 public synchronized boolean convert(String word, String pdf) {
034 File pdfFile = new File(pdf);
035 File wordFile = new File(word);
036 ActiveXComponent wps = null;
037 try {
038 wps = new ActiveXComponent("wps.application");
039 ActiveXComponent doc = wps.invokeGetComponent("Documents").invokeGetComponent("Open", newVariant(wordFile.getAbsolutePath()));
040 doc.invoke("ExportPdf", new Variant(pdfFile.getAbsolutePath()));
041 doc.invoke("Close");
042 doc.safeRelease();
043 } catch (Exception ex) {
044 Logger.getLogger(Doc2Pdf.class.getName()).log(Level.SEVERE, null, ex);
045 return false;
046 } catch (Error ex) {
047 Logger.getLogger(Doc2Pdf.class.getName()).log(Level.SEVERE, null, ex);
048 return false;
049 } finally {
050 if (wps != null) {
051 wps.invoke("Terminate");
052 wps.safeRelease();
053 }
054 }
055 return true;
056 }
057 }
058
059 public static class PdfCreator implements Converter {
060
061 public static final int STATUS_IN_PROGRESS = 2;
062 public static final int STATUS_WITH_ERRORS = 1;
063 public static final int STATUS_READY = 0;
064 private ActiveXComponent pdfCreator;
065 private DispatchEvents dispatcher;
066 private volatile int status;
067 private Variant defaultPrinter;
068
069 private void init() {
070 pdfCreator = new ActiveXComponent("PDFCreator.clsPDFCreator");
071 dispatcher = new DispatchEvents(pdfCreator, this);
072 pdfCreator.setProperty("cVisible", new Variant(false));
073 pdfCreator.invoke("cStart", new Variant[]{newVariant("/NoProcessingAtStartup"), new Variant(true)});
074 setCOption("UseAutosave", 1);
075 setCOption("UseAutosaveDirectory", 1);
076 setCOption("AutosaveFormat", 0); // 0 = PDF
077 defaultPrinter = pdfCreator.getProperty("cDefaultPrinter");
078 status = STATUS_IN_PROGRESS;
079 pdfCreator.setProperty("cDefaultprinter", "PDFCreator");
080 pdfCreator.invoke("cClearCache");
081 pdfCreator.setProperty("cPrinterStop", false);
082 }
083
084 private void setCOption(String property, Object value) {
085 Dispatch.invoke(pdfCreator, "cOption", Dispatch.Put, new Object[]{property, value}, new int[2]);
086 }
087
088 private void close() {
089 if (pdfCreator != null) {
090 pdfCreator.setProperty("cDefaultprinter", defaultPrinter);
091 pdfCreator.invoke("cClearCache");
092 pdfCreator.setProperty("cPrinterStop", true);
093 pdfCreator.invoke("cClose");
094 pdfCreator.safeRelease();
095 pdfCreator = null;
096 }
097 if (dispatcher != null) {
098 dispatcher.safeRelease();
099 dispatcher = null;
100 }
101 }
102
103 public synchronized boolean convert(String word, String pdf) {
104 File pdfFile = new File(pdf);
105 File wordFile = new File(word);
106 try {
107 init();
108 setCOption("AutosaveDirectory", pdfFile.getParentFile().getAbsolutePath());
109 if (pdfFile.exists()) {
110 pdfFile.delete();
111 }
112 pdfCreator.invoke("cPrintfile", wordFile.getAbsolutePath());
113 int seconds = 0;
114 while (isInProcess()) {
115 seconds++;
116 if (seconds > 30) { // timeout
117 throw new Exception("convertion timeout!");
118 }
119 Thread.sleep(1000);
120 }
121 if (isWithErrors()) return false;
122 // 由于转换前设置cOption的AutosaveFilename不能保证输出的文件名与设置的相同(pdfcreator会加入/修改后缀名)
123 // 所以这里让pdfcreator使用自动生成的文件名进行输出,然后在保存后将其重命名为目标文件名
124 File outputFile = newFile(pdfCreator.getPropertyAsString("cOutputFilename"));
125 if (outputFile.exists()) {
126 outputFile.renameTo(pdfFile);
127 }
128 } catch (InterruptedException ex) {
129 Logger.getLogger(Doc2Pdf.class.getName()).log(Level.SEVERE, null, ex);
130 return false;
131 } catch (Exception ex) {
132 Logger.getLogger(Doc2Pdf.class.getName()).log(Level.SEVERE, null, ex);
133 return false;
134 } catch (Error ex) {
135 Logger.getLogger(Doc2Pdf.class.getName()).log(Level.SEVERE, null, ex);
136 return false;
137 } finally {
138 close();
139 }
140 return true;
141 }
142
143 private boolean isInProcess() {
144 return status == STATUS_IN_PROGRESS;
145 }
146
147 private boolean isWithErrors() {
148 return status == STATUS_WITH_ERRORS;
149 }
150
151 // eReady event
152 public void eReady(Variant[] args) {
153 status = STATUS_READY;
154 }
155
156 // eError event
157 public void eError(Variant[] args) {
158 status = STATUS_WITH_ERRORS;
159 }
160 }
161
162 public static void main(String[] args) {
163 convert("e:\\test.doc", "e:\\output.pdf");
164 }
165 }

⑹ java中如何实现向已有的PDF文件插入附件

可以用Spire.Pdf for Java类库给PDF文档添加附件,下面的代码是插入Excel和Word附件给你参考:

import com.spire.pdf.annotations.*;

import com.spire.pdf.attachments.PdfAttachment;

import com.spire.pdf.graphics.*;

import java.awt.*;

import java.awt.geom.Dimension2D;

import java.awt.geom.Rectangle2D;

import java.io.File;

import java.io.FileInputStream;

import java.io.IOException;

public class AttachFiles {
public static void main(String[] args) throws IOException {


//创建PdfDocument对象


PdfDocument doc = new PdfDocument();


//加载PDF文档


doc.loadFromFile("C:\Users\Administrator\Desktop\sample.pdf");


//添加附件到PDF


PdfAttachment attachment = new PdfAttachment("C:\Users\Administrator\Desktop\使用说明书.docx");


doc.getAttachments().add(attachment);


//绘制标签

String label = "财务报表.xlsx";


PdfTrueTypeFont font = new PdfTrueTypeFont(new Font("Arial Unicode MS",Font.PLAIN,12),true);


double x = 35;


double y = doc.getPages().get(0).getActualSize().getHeight() - 200;


doc.getPages().get(0).getCanvas().drawString(label, font, PdfBrushes.getOrange(), x, y);

//添加注释附件到PDF


String filePath = "C:\Users\Administrator\Desktop\财务报表.xlsx";


byte[] data = toByteArray(filePath);


Dimension2D size = font.measureString(label);


Rectangle2D bound = new Rectangle2D.Float((float) (x + size.getWidth() + 2), (float) y, 10, 15);


PdfAttachmentAnnotation annotation = new PdfAttachmentAnnotation(bound, filePath, data);


annotation.setColor(new PdfRGBColor(new Color(0, 128, 128)));


annotation.setFlags(PdfAnnotationFlags.Default);


annotation.setIcon(PdfAttachmentIcon.Graph);


annotation.setText("点击打开财务报表.xlsx");


doc.getPages().get(0).getAnnotationsWidget().add(annotation);

//保存文档


doc.saveToFile("Attachments.pdf");
}

//读取文件到byte数组


public static byte[] toByteArray(String filePath) throws IOException {

File file = new File(filePath);


long fileSize = file.length();


if (fileSize > Integer.MAX_VALUE) {


System.out.println("file too big...");


return null;


}


FileInputStream fi = new FileInputStream(file);


byte[] buffer = new byte[(int) fileSize];


int offset = 0;


int numRead = 0;


while (offset < buffer.length && (numRead = fi.read(buffer, offset, buffer.length - offset)) >= 0) {


offset += numRead;


}

if (offset != buffer.length) {


throw new IOException("Could not completely read file "
+ file.getName());


}


fi.close();


return buffer;


}


}

效果:

⑺ java处理pdf文件

FileInputStream 读取文件流就OK 至于在页面显示

1、客户机上要有PDF2、URL url =new URL("file:///"+ 你的文件路径);response.setContentType(url.openConnection().getContentType());response.setHeader("Content-Disposition", "inline; filename="+ 文件名);或在jsp页面中加入 <% response.setHeader("Content-disposition", "attachment; filename=*.pdf"); %> 以上会提示下载、保存 <% response.setHeader("Content-disposition", "filename=*.pdf"); %> 不要attachment; 就会直接打开,显示pdf了

⑻ 如何运用Java组件itext生成pdf

Controller层(param为数据)

byte[]bytes=PdfUtils.createPdf(param);
ByteArrayInputStreaminStream=newByteArrayInputStream(bytes);
//设置输出的格式
response.setContentType("bin");
response.setHeader("content-disposition","attachment;filename="+URLEncoder.encode(itemName+"(评审意见).pdf","UTF-8"));
//循环取出流中的数据
byte[]b=newbyte[2048];
intlen;
while((len=inStream.read(b))>0)
response.getOutputStream().write(b,0,len);

inStream.close();

Service层(param为数据)

public static byte[] createPdf(Map<String,Object> param) {

byte[] result= null;

ByteArrayOutputStream baos = null;

//支流程评审信息汇总

List<CmplncBranchRvwInfoDTO> branchRvwInfos = (List<CmplncBranchRvwInfoDTO>) param.get("branchRvwInfos");

//主流程评审信息汇总

List<CmplncMainRvwInfoDTO> mainRvwInfos = (List<CmplncMainRvwInfoDTO>) param.get("mainRvwInfos");

//主评审信息

CmplncRvwFormDTO rvwFormDTO = (CmplncRvwFormDTO) param.get("rvwFormDTO");

//附件列表

List<FileInfoDTO> fileList = (List<FileInfoDTO>) param.get("fileList");

//专业公司

String legalEntityDeptDesc = (String) param.get("legalEntityDeptDesc");

String legalEntitySonDeptDesc = (String) param.get("legalEntitySonDeptDesc");

//设置页边距

Document doc = new Document(PageSize.A4, 20, 20, 60, 20);

try {

baos = new ByteArrayOutputStream();//构建字节输出流

PdfWriter writer = PdfWriter.getInstance(doc,baos);

//页眉页脚字体

BaseFont bf = null;

BaseFont bFont = null;

try {

bFont = BaseFont.createFont(BaseFont.HELVETICA, BaseFont.WINANSI, BaseFont.EMBEDDED);

bf = BaseFont.createFont("STSong-Light", "UniGB-UCS2-H",BaseFont.NOT_EMBEDDED);

} catch (Exception e) {

e.printStackTrace();

}

Font footerFont = new Font(bFont, 10, Font.NORMAL);

Font title = new Font(bf,15,Font.BOLD);

Font content = new Font(bf,9,Font.NORMAL);

Font chinese = new Font(bf, 10, Font.BOLD);

/**

* HeaderFooter的第2个参数为非false时代表打印页码

* 页眉页脚中也可以加入图片,并非只能是文字

*/

HeaderFooter header=new HeaderFooter(new Phrase("法律合规评审系统",title),false);

//设置是否有边框等

header.setBorder(Rectangle.NO_BORDER);

header.setAlignment(1);

doc.setHeader(header);

HeaderFooter footer=new HeaderFooter(new Phrase("-",footerFont),new Phrase("-",footerFont));

/**

* 0左 1中 2右

*/

footer.setAlignment(1);

footer.setBorder(Rectangle.NO_BORDER);

doc.setFooter(footer);

doc.open();

//doc.add(new Paragraph("评审意见:",chinese));

//7列

PdfPTable table = new PdfPTable(7);

PdfPCell cell;

table.addCell(new Paragraph("评审项目编号",chinese));

table.addCell(new Paragraph(rvwFormDTO.getRvwItemCode(),content));

cell = new PdfPCell(new Paragraph("评审项目类型",chinese));

cell.setColspan(2);

table.addCell(cell);

String rvwItemParentType = (String) param.get("rvwItemParentType");

String rvwItemType = (String) param.get("rvwItemType");

String rvwItemTwoType = (String) param.get("rvwItemTwoType");

cell = new PdfPCell(new Paragraph(rvwItemParentType+"/"+rvwItemType+"/"+rvwItemTwoType,content));

cell.setColspan(3);

table.addCell(cell);

table.addCell(new Paragraph("申请人姓名",chinese));

table.addCell(new Paragraph(rvwFormDTO.getApplicantName(),content));

cell = new PdfPCell(new Paragraph("申请人所在部门",chinese));

cell.setColspan(2);

table.addCell(cell);

cell = new PdfPCell(new Paragraph(rvwFormDTO.getAplcntDeptName(),content));

cell.setColspan(3);

table.addCell(cell);

table.addCell(new Paragraph("录入人姓名",chinese));

table.addCell(new Paragraph(rvwFormDTO.getRecordName(),content));

cell = new PdfPCell(new Paragraph("项目涉及金额",chinese));

cell.setColspan(2);

table.addCell(cell);

table.addCell(new Paragraph(String.valueOf(rvwFormDTO.getInvolveAmount()==null?0:rvwFormDTO.getInvolveAmount()),content));

table.addCell(new Paragraph("币种",chinese));

String involveAmountType = (String) param.get("involveAmountType");

table.addCell(new Paragraph(involveAmountType,content));

table.addCell(new Paragraph("专业公司",chinese));

cell = new PdfPCell(new Paragraph(legalEntityDeptDesc+"->"+legalEntitySonDeptDesc,content));

cell.setColspan(6);

table.addCell(cell);

table.addCell(new Paragraph("项目名称",chinese));

cell = new PdfPCell(new Paragraph(rvwFormDTO.getItemName(),content));

cell.setColspan(6);

table.addCell(cell);

table.addCell(new Paragraph("项目概述",chinese));

cell = new PdfPCell(new Paragraph(rvwFormDTO.getItemOverview(),content));

cell.setColspan(6);

table.addCell(cell);

table.addCell(new Paragraph("评审需求",chinese));

cell = new PdfPCell(new Paragraph(rvwFormDTO.getRvwDemand(),content));

cell.setColspan(6);

table.addCell(cell);

table.addCell(new Paragraph("申请人自我评估",chinese));

cell = new PdfPCell(new Paragraph(rvwFormDTO.getApplicantSelfAssmnt(),content));

cell.setColspan(6);

table.addCell(cell);

/* table.addCell(new Paragraph("同步抄送",chinese));

cell = new PdfPCell(new Paragraph(rvwFormDTO.getSyncsenderNames(),content));

cell.setColspan(6);

table.addCell(cell);*/

int infoNum = 0;

if(fileList.size() > 0){

//附件信息

cell = new PdfPCell(new Paragraph("附件信息",chinese));

cell.setUseAscender(true);

cell.setHorizontalAlignment(Element.ALIGN_CENTER); //水平居中

cell.setVerticalAlignment(Element.ALIGN_MIDDLE); //垂直居中

cell.setRowspan(fileList.size()+1);

table.addCell(cell);

//序号

cell = new PdfPCell(new Paragraph("序号",chinese));

cell.setUseAscender(true);

cell.setHorizontalAlignment(Element.ALIGN_CENTER); //水平居中

cell.setVerticalAlignment(Element.ALIGN_MIDDLE); //垂直居中

table.addCell(cell);

//附件名称

cell = new PdfPCell(new Paragraph("附件名称",chinese));

cell.setUseAscender(true);

cell.setHorizontalAlignment(Element.ALIGN_CENTER); //水平居中

cell.setVerticalAlignment(Element.ALIGN_MIDDLE); //垂直居中

table.addCell(cell);

//上传时间

cell = new PdfPCell(new Paragraph("上传时间",chinese));

cell.setUseAscender(true);

cell.setHorizontalAlignment(Element.ALIGN_CENTER); //水平居中

cell.setVerticalAlignment(Element.ALIGN_MIDDLE); //垂直居中

table.addCell(cell);

//上传人

cell = new PdfPCell(new Paragraph("上传人",chinese));

cell.setUseAscender(true);

cell.setHorizontalAlignment(Element.ALIGN_CENTER); //水平居中

cell.setVerticalAlignment(Element.ALIGN_MIDDLE); //垂直居中

table.addCell(cell);

//附件类型

cell = new PdfPCell(new Paragraph("附件类型",chinese));

cell.setUseAscender(true);

cell.setHorizontalAlignment(Element.ALIGN_CENTER); //水平居中

cell.setVerticalAlignment(Element.ALIGN_MIDDLE); //垂直居中

table.addCell(cell);

//法律合规评审

cell = new PdfPCell(new Paragraph("法律合规评审",chinese));

cell.setUseAscender(true);

cell.setHorizontalAlignment(Element.ALIGN_CENTER); //水平居中

cell.setVerticalAlignment(Element.ALIGN_MIDDLE); //垂直居中

table.addCell(cell);

for (FileInfoDTO file : fileList) {

infoNum++;

//序号

cell = new PdfPCell(new Paragraph(infoNum+"",content));

cell.setUseAscender(true);

cell.setHorizontalAlignment(Element.ALIGN_CENTER); //水平居中

cell.setVerticalAlignment(Element.ALIGN_MIDDLE); //垂直居中

table.addCell(cell);

//附件名称

cell = new PdfPCell(new Paragraph(file.getFileName(),content));

cell.setUseAscender(true);

cell.setHorizontalAlignment(Element.ALIGN_CENTER); //水平居中

cell.setVerticalAlignment(Element.ALIGN_MIDDLE); //垂直居中

table.addCell(cell);

//上传时间

cell = new PdfPCell(new Paragraph(file.getUploadTimeFormat(),content));

cell.setUseAscender(true);

cell.setHorizontalAlignment(Element.ALIGN_CENTER); //水平居中

cell.setVerticalAlignment(Element.ALIGN_MIDDLE); //垂直居中

table.addCell(cell);

//上传人

cell = new PdfPCell(new Paragraph(file.getUploadName(),content));

cell.setUseAscender(true);

cell.setHorizontalAlignment(Element.ALIGN_CENTER); //水平居中

cell.setVerticalAlignment(Element.ALIGN_MIDDLE); //垂直居中

table.addCell(cell);

//附件类型

String fileType;

if("1".equals(file.getFileType())){

fileType = "合同文件";

}else if("99".equals(file.getFileType())){

fileType = "支持文档";

}else{

fileType = "";

}

cell = new PdfPCell(new Paragraph(fileType,content));

cell.setUseAscender(true);

cell.setHorizontalAlignment(Element.ALIGN_CENTER); //水平居中

cell.setVerticalAlignment(Element.ALIGN_MIDDLE); //垂直居中

table.addCell(cell);

//法律合规评审

String typeRvwStatus;

if("1".equals(file.getTypeRvwStatus())){

typeRvwStatus = "经审查附件无重大法律合规问题";

}else if("2".equals(file.getTypeRvwStatus())){

typeRvwStatus = "退回修改";

}else{

typeRvwStatus = "";

}

cell = new PdfPCell(new Paragraph(typeRvwStatus,content));

cell.setUseAscender(true);

cell.setHorizontalAlignment(Element.ALIGN_CENTER); //水平居中

cell.setVerticalAlignment(Element.ALIGN_MIDDLE); //垂直居中

table.addCell(cell);

}

}else{

//附件信息

cell = new PdfPCell(new Paragraph("附件信息",chinese));

table.addCell(cell);

cell = new PdfPCell(new Paragraph("没有附件",content));

cell.setColspan(6);

table.addCell(cell);

}

cell = new PdfPCell(new Paragraph("评审意见",chinese));

cell.setRowspan(mainRvwInfos.size()+branchRvwInfos.size());

//居中

cell.setUseAscender(true);

cell.setHorizontalAlignment(Element.ALIGN_CENTER); //水平居中

cell.setVerticalAlignment(Element.ALIGN_MIDDLE); //垂直居中

table.addCell(cell);

if(mainRvwInfos.size()>0){

cell = new PdfPCell(new Paragraph("主评审意见",chinese));

cell.setRowspan(mainRvwInfos.size());

//居中

cell.setUseAscender(true);

cell.setHorizontalAlignment(Element.ALIGN_CENTER); //水平居中

cell.setVerticalAlignment(Element.ALIGN_MIDDLE); //垂直居中

table.addCell(cell);

infoNum = 0;

for (CmplncMainRvwInfoDTO dto : mainRvwInfos) {

infoNum++;

//序号

cell = new PdfPCell(new Paragraph(infoNum+"",content));

cell.setUseAscender(true);

cell.setHorizontalAlignment(Element.ALIGN_CENTER); //水平居中

cell.setVerticalAlignment(Element.ALIGN_MIDDLE); //垂直居中

table.addCell(cell);

//评审意见

PdfPTable branchRvwInfosTable = new PdfPTable(1);

cell = new PdfPCell(new Paragraph(delHTMLTag(dto.getRvwOpinion()),content));

cell.disableBorderSide(2);

branchRvwInfosTable.addCell(cell);

//评审人和评审时间

cell = new PdfPCell(new Paragraph(dto.getRvwUmName()+"/"+getStringDate(dto.getRvwTime()),content));

cell.setHorizontalAlignment(Element.ALIGN_RIGHT);

cell.disableBorderSide(1);

cell.setPaddingTop(5);

branchRvwInfosTable.addCell(cell);

PdfPCell branchRvwInfosCell = new PdfPCell(branchRvwInfosTable);

branchRvwInfosCell.setColspan(4);

table.addCell(branchRvwInfosCell);

}

doc.add(table);

}

if(branchRvwInfos.size()>0){

cell = new PdfPCell(new Paragraph("支评审意见",chinese));

cell.setRowspan(branchRvwInfos.size());

//居中

cell.setUseAscender(true);

cell.setHorizontalAlignment(Element.ALIGN_CENTER); //水平居中

cell.setVerticalAlignment(Element.ALIGN_MIDDLE); //垂直居中

table.addCell(cell);

infoNum = 0;

for (CmplncBranchRvwInfoDTO dto : branchRvwInfos) {

infoNum++;

//序号

cell = new PdfPCell(new Paragraph(infoNum+"",content));

cell.setUseAscender(true);

cell.setHorizontalAlignment(Element.ALIGN_CENTER); //水平居中

cell.setVerticalAlignment(Element.ALIGN_MIDDLE); //垂直居中

table.addCell(cell);

//评审意见

PdfPTable branchRvwInfosTable = new PdfPTable(1);

cell = new PdfPCell(new Paragraph(delHTMLTag(dto.getRvwOpinion()),content));

cell.disableBorderSide(2);

branchRvwInfosTable.addCell(cell);

//评审人和评审时间

cell = new PdfPCell(new Paragraph(dto.getRvwUmName()+"/"+getStringDate(dto.getRvwTime()),content));

cell.setHorizontalAlignment(Element.ALIGN_RIGHT);

cell.disableBorderSide(1);//隐藏上边框

cell.setPaddingTop(5);

branchRvwInfosTable.addCell(cell);

PdfPCell branchRvwInfosCell = new PdfPCell(branchRvwInfosTable);

branchRvwInfosCell.setColspan(4);

table.addCell(branchRvwInfosCell);

}

doc.add(table);

}

if(doc != null){

doc.close();

}

result =baos.toByteArray();

} catch (DocumentException e) {

e.printStackTrace();

}finally{

if(baos != null){

try {

baos.close();

} catch (IOException e) {

log.error("PDF异常", e);

}

}

}

return result;

}

工具

/**

* 去掉HTML标签

* @param htmlStr

* @return

*/

public static String delHTMLTag(String htmlStr){

if (htmlStr!=null){

String regEx_script="<script[^>]*?>[\s\S]*?<\/script>"; //定义script的正则表达式

String regEx_style="<style[^>]*?>[\s\S]*?<\/style>"; //定义style的正则表达式

String regEx_html="<[^>]+>"; //定义HTML标签的正则表达式

Pattern p_script=Pattern.compile(regEx_script,Pattern.CASE_INSENSITIVE);

Matcher m_script=p_script.matcher(htmlStr);

htmlStr=m_script.replaceAll(""); //过滤script标签

Pattern p_style=Pattern.compile(regEx_style,Pattern.CASE_INSENSITIVE);

Matcher m_style=p_style.matcher(htmlStr);

htmlStr=m_style.replaceAll(""); //过滤style标签

Pattern p_html=Pattern.compile(regEx_html,Pattern.CASE_INSENSITIVE);

Matcher m_html=p_html.matcher(htmlStr);

htmlStr=m_html.replaceAll(""); //过滤html标签

Pattern p_enter = Pattern.compile("\s*| | | ");

Matcher m_enter = p_enter.matcher(htmlStr);

htmlStr = m_enter.replaceAll("");

}

return htmlStr.trim().replaceAll("&nbsp;", ""); //返回文本字符串

}

/**

* @return返回字符串格式 yyyy-MM-dd HH:mm:ss

*/

public static String getStringDate(Date date) {

SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

String dateString = formatter.format(date);

return dateString;

}

⑼ 如何用纯java代码实现word转pdf

几种方案:
方法一:用apache pio 读取doc文件,然后转成html文件用Jsoup格式化html文件,最后用itext将html文件转成pdf。

方法2:使用jdoctopdf来实现,这是一个封装好的包,可以把doc转换成pdf,html,xml等格式,调用很方便
地址:
需要注意中文字体的写入问题。

方法3:使用jodconverter来调用openOffice的服务来转换,openOffice有个各个平台的版本,所以这种方法跟方法1一样都是跨平台的。
jodconverter的下载地址:
首先要安装openOffice,下载地址:
安装完后要启动openOffice的服务,具体启动方法请自行google

方法4:效果最好的一种方法,但是需要window环境,而且速度是最慢的需要安装msofficeWord以及SaveAsPDFandXPS.exe(word的一个插件,用来把word转化为pdf)
Office版本是2007,因为SaveAsPDFandXPS是微软为office2007及以上版本开发的插件
SaveAsPDFandXPS下载地址:
jacob 包下载地址:

阅读全文

与java极限编程pdf相关的资料

热点内容
阴阳路郑力 浏览:213
怎样显示u盘里所有文件夹 浏览:271
c代码工程中的编译脚本 浏览:475
可以看岛国电影的网站 浏览:640
当程序员需要什么特质 浏览:119
韩国补习老师去学生家里电影 浏览:311
c语言命令行程序怎么编译 浏览:60
程序员王者昵称 浏览:232
编译过程中源码被扫描几次 浏览:881
刚刚上映什么网址可以看 浏览:183
外国爱情激情片 浏览:255
app怎么引用网站 浏览:111
单片机的按键焊接步骤 浏览:851
mqforlinux下载 浏览:89
安卓10推特怎么下载 浏览:655
现在有什么网址可以看片 浏览:945
武林盟主私密记事txt下载 浏览:397
功夫在哪拍的 浏览:321
可以在线观看的网址有哪些 浏览:954
索亚之书pdf 浏览:146