91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡介

找死我了, 實現(xiàn)java下開發(fā)PDF閱讀器 導入acrobat.jar和MRJToolkitStubs.zip就能用了 怎么使用 調(diào)用com.adobe.acrobat.Viewer類就可以了,具體的東西工具包里都有了自己研究就好了。

資源截圖

代碼片段和文件信息

import?java.awt.*;
import?java.awt.event.*;
import?java.io.*;

import?com.adobe.acrobat.Viewer;
import?com.adobe.acrobat.ViewerCommand;

public?class?Exerciser?implements?ViewerCommand?{
????private?TextArea?log;
????private?frame?frame;
private?Viewer?acrobat;

????public?Exerciser()?{
log?=?new?TextArea(10?70);
frame?=?new?frame(“Faultline?Exerciser“);
frame.setLayout(new?BorderLayout());
frame.add(log?BorderLayout.CENTER);
frame.setSize(400?400);
frame.show();
frame.addWindowListener(new?WindowAdapter()?{
????public?void?windowClosing(WindowEvent?e)?{
System.exit(0);?
????}
});
try?{
acrobat?=?(new?Viewer()).openNewWindow();
}?catch?(Exception?x)?{
????log.append(“Unable?to?create?viewer?\n“);
}
????}

????public?void?ls(String?dir)?{
list(new?File(dir)?“.“);
????}

????private?void?list(File?cd?String?file)?{
File?d?=?new?File(cd?file);
String?files[]?=?d.list();
for?(int?i?=?0;?i? ????File?f?=?new?File(d?files[i]);
????if?(f.isDirectory())?{
list(d?files[i]);
????}?else?if?(f.isFile()?&&?f.getName().toLowerCase().endsWith(“.pdf“))?{
render(f);
????}
}
????}

????private?void?render(File?f)?{
try?{
????System.out.println(“Start?to?render:?“?+?f.getAbsolutePath());
????FileInputStream?fis?=?new?FileInputStream(f);
????acrobat.setDocumentInputStream(fis);
long?start?=?System.currentTimeMillis();
????for?(int?i?=?0;?i? try?{
????acrobat.renderPage(i);
}?catch?(Exception?x)?{
????System.out.println(“Unable?to?render?page:?“?+?i?+?“?of?file?“?+?f.getName());
????x.printStackTrace();
}
????}
????long?elapsed?=?System.currentTimeMillis()?-?start;
????log.append(“Rendered?(“?+?elapsed?+?“):?“?+?f.getAbsolutePath()?+?“\n“);
????acrobat.execMenuItem(ViewerCommand.Close_K);
fis.close();
}?catch(Exception?x)?{
????System.out.println(“Unable?to?render?file:?“?+?f.getName());
????log.append(“Unable?to?render:?“?+?f.getAbsolutePath()?+?“\n“);
}
????}

????public?static?void?main(String?args[])?{
Exerciser?e?=?new?Exerciser();
e.ls(args[0]);
????}
}





?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??1999-11-02?09:54??meta-INF\
?????文件??????????68??1999-11-02?09:54??meta-INF\MANIFEST.MF
?????文件????????8876??1999-06-03?16:59??betabanner.gif
?????文件????????5207??1999-11-01?10:49??main.html
?????文件????????1642??1999-11-01?09:38??betatopbar.gif
?????目錄???????????0??1999-11-02?09:53??docs\
?????文件????????1770??1999-11-01?10:58??docs\allclasses-frame.html
?????文件????????3422??1999-11-01?10:58??docs\deprecated-list.html
?????文件????????6661??1999-11-01?10:58??docs\help-doc.html
?????文件???????73656??1999-11-01?10:58??docs\index-all.html
?????文件?????????720??1999-11-01?10:58??docs\index.html
?????文件????????6415??1999-11-01?10:58??docs\overview-tree.html
?????文件??????????19??1999-11-01?10:58??docs\package-list
?????文件?????????631??1999-11-01?10:58??docs\packages.html
?????文件????????6377??1999-11-01?10:58??docs\serialized-form.html
?????文件????????1269??1999-11-01?10:58??docs\stylesheet.css
?????目錄???????????0??1999-11-02?09:52??docs\com\
?????目錄???????????0??1999-11-02?09:53??docs\com\adobe\
?????目錄???????????0??1999-11-02?09:53??docs\com\adobe\acrobat\
?????文件????????1269??1999-11-01?10:58??docs\com\adobe\acrobat\package-frame.html
?????文件????????5221??1999-11-01?10:58??docs\com\adobe\acrobat\package-summary.html
?????文件????????5071??1999-11-01?10:58??docs\com\adobe\acrobat\package-tree.html
?????文件???????11951??1999-11-01?10:58??docs\com\adobe\acrobat\PDFBookmark.html
?????文件???????23023??1999-11-01?10:58??docs\com\adobe\acrobat\PDFDocument.html
?????文件????????6654??1999-11-01?10:58??docs\com\adobe\acrobat\RenderingObserver.html
?????文件????????9712??1999-11-01?10:58??docs\com\adobe\acrobat\ViewerBeanInfo.html
?????文件???????34641??1999-11-01?10:58??docs\com\adobe\acrobat\ViewerCommand.html
?????文件???????54217??1999-11-01?11:20??docs\com\adobe\acrobat\Viewer.html
?????目錄???????????0??1999-11-02?09:53??docs\com\adobe\acrobat\bytearray\
?????文件???????36103??1999-11-01?11:17??docs\com\adobe\acrobat\bytearray\ByteRange.html
?????文件???????16953??1999-11-01?11:17??docs\com\adobe\acrobat\bytearray\ByteRangeInputStream.html
............此處省略18個文件信息

評論

共有 條評論