ASP 做 模仿 豆丁网和百度文库 怎么搞啊?利用 第三方插件 还是别的什么的啊 代码 和思路啊 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 应该是用的第三方插件。FLASH做的。。 使用 FlashPaper2.2 或者类似的软件或者组件将任何文件转换成SWF格式就可以了搜索 FlashPaper 网上很多介绍 你可以从http://flexpaper.googlecode.com/svn/trunk上下载flexpaer播放器,还有源码 ,用要SVN检出, 1 :下载openoffice,安装到本机,然后能过命令行打开服务 cd C:\Program Files\OpenOffice.org 3\program soffice -headless -accept="socket,host=127.0.0.1,port=8100;urp;" -nofirststartwizard 在程序中你可以能过代码将word,txt,...数据源转化成Pdf格式的, 这是测试代码: public static void main(String[] args) { File inputFile = new File("D:\\新建文件夹 (2)\\河南分公司“创先争优”活动简报 第一期.doc"); File outputFile = new File("D:\\新建文件夹 (2)\\河南分公司“创先争优”活动简报 第一期.pdf"); // connect to an OpenOffice.org instance running on port 8100 OpenOfficeConnection connection = new SocketOpenOfficeConnection(8100); try { connection.connect(); } catch (ConnectException e) { // TODO Auto-generated catch block e.printStackTrace(); } // convert DocumentConverter converter = new OpenOfficeDocumentConverter(connection); converter.convert(inputFile, outputFile); // close the connection connection.disconnect(); } 2:安装swftoos到本机,可以能过代码将pdf格式 的文件转化成swf public static int ConvertPdfToSwf(String fileName,String destPath){ String destName = "",fileExt = ""; StringBuffer command = new StringBuffer(); fileExt = fileName.split("\\.")[fileName.split("\\.").length-1].toLowerCase(); try{ File file = new File(fileName); if(!file.exists()){//判断源文件是否存在 return 1; }else if(!fileExt.equals("pdf")){//判断文件是否是pdf格式的文件 return 2; } else{ String swftoolsPath = "C:\\Program Files\\SWFTools";//获取pdf转swf工具的路径 if(!swftoolsPath.substring(swftoolsPath.length()-1, swftoolsPath.length()).equals("\\")){ swftoolsPath = swftoolsPath+"\\"; //在目录后加 "\" } if(!destPath.substring(destPath.length()-1, destPath.length()).equals("\\")){ destPath = destPath+"\\"; //在目录后加 "\" } File destFile = new File(destPath); if(!destFile.exists()){//目标文件路径如果不存在,则创建目录 destFile.mkdirs(); } destName = file.getName().substring(0, file.getName().length()-4)+".swf";//目标文件名称 command.append(swftoolsPath).append("pdf2swf.exe ").append(fileName).append(" -o ").append(destPath).append(destName); Process pro = Runtime.getRuntime().exec(command.toString()); BufferedReader buffer = new BufferedReader(new InputStreamReader(pro.getInputStream())); while(buffer.readLine()!=null); return pro.exitValue(); } }catch (Exception e){ e.printStackTrace(); return 3; } 3:最后再把Exmple/FlexPaperViewer.html里面的SwfFile : escape("20100826124510.swf?v1.4.0rc2-refresh2"),文件名改成你要播放的那个swf,就可以看到效果了,引自http://space.cnblogs.com/q/17912/有思路已经不错了,这种核心的东西不会泄露出来的,不然豆丁开放api干嘛? FlashPaper 配置 怎么弄的? 5楼你贴的我看了 是java的 而且那个有问题 如果有人传坏掉的文档 上传 转换的时候的时候会出错之后 在传 不管什么样的 他都会转换失败 唯一解决的都是 重启 FlashPaper 就是一个虚拟打印机,下载后,执行里面的bat文件,然后就可以打印任何文件到swf http://topic.csdn.net/u/20100715/15/adce1533-4554-4e59-b0e2-d85a9fa627e4.html 如果只是模仿的话用CSS+DIV+JAVASCRIPT+WEBSERVICES就应该可以了 我顶我顶我顶我顶我顶我顶 SOS 我以前用 flashpapers 做个,但是没成功。在xp上能转换,但是一到2003 iis6上面死活不行,还有 虚拟打印机很不稳定。 如果只是模仿的话用CSS+DIV+JAVASCRIPT+WEBSERVICES就应该可以了 PDF阅读器 Jquery.Ajax 的问题 输出excel的问题 ASP.net Mvc 2中如何返回View中的内容? 关于网站自定义配置文件处理,进来探讨下 asp.net2.0如何调用客户端的脚本函数! java+webservice怎么做聊天室?????? 建立个帖子,讨论下ASPNETForums [AjaxPro.AjaxMethod] 关于这个注册方法后页面加载的问题 请看看这是什么错误? 文件下载的副作用,百思不得其解,请思归及各位版主看一下! 求助网站的浏览历史记录功能 如何在asp.net网站项目里注册两个fckeditor
1 :下载openoffice,安装到本机,然后能过命令行打开服务
cd C:\Program Files\OpenOffice.org 3\program
soffice -headless -accept="socket,host=127.0.0.1,port=8100;urp;" -nofirststartwizard 在程序中你可以能过代码将word,txt,...数据源转化成Pdf格式的,
这是测试代码: public static void main(String[] args) { File inputFile = new File("D:\\新建文件夹 (2)\\河南分公司“创先争优”活动简报 第一期.doc");
File outputFile = new File("D:\\新建文件夹 (2)\\河南分公司“创先争优”活动简报 第一期.pdf"); // connect to an OpenOffice.org instance running on port 8100
OpenOfficeConnection connection = new SocketOpenOfficeConnection(8100);
try {
connection.connect();
} catch (ConnectException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
// convert
DocumentConverter converter = new OpenOfficeDocumentConverter(connection);
converter.convert(inputFile, outputFile);
// close the connection
connection.disconnect(); } 2:安装swftoos到本机,可以能过代码将pdf格式 的文件转化成swf
public static int ConvertPdfToSwf(String fileName,String destPath){
String destName = "",fileExt = "";
StringBuffer command = new StringBuffer();
fileExt = fileName.split("\\.")[fileName.split("\\.").length-1].toLowerCase();
try{
File file = new File(fileName);
if(!file.exists()){//判断源文件是否存在
return 1;
}else if(!fileExt.equals("pdf")){//判断文件是否是pdf格式的文件
return 2;
}
else{
String swftoolsPath = "C:\\Program Files\\SWFTools";//获取pdf转swf工具的路径
if(!swftoolsPath.substring(swftoolsPath.length()-1, swftoolsPath.length()).equals("\\")){
swftoolsPath = swftoolsPath+"\\"; //在目录后加 "\"
}
if(!destPath.substring(destPath.length()-1, destPath.length()).equals("\\")){
destPath = destPath+"\\"; //在目录后加 "\"
}
File destFile = new File(destPath);
if(!destFile.exists()){//目标文件路径如果不存在,则创建目录
destFile.mkdirs();
}
destName = file.getName().substring(0, file.getName().length()-4)+".swf";//目标文件名称
command.append(swftoolsPath).append("pdf2swf.exe ").append(fileName).append(" -o ").append(destPath).append(destName);
Process pro = Runtime.getRuntime().exec(command.toString());
BufferedReader buffer = new BufferedReader(new InputStreamReader(pro.getInputStream()));
while(buffer.readLine()!=null);
return pro.exitValue();
}
}catch (Exception e){
e.printStackTrace();
return 3;
}
3:最后再把Exmple/FlexPaperViewer.html里面的SwfFile : escape("20100826124510.swf?v1.4.0rc2-refresh2"),文件名改成你要播放的那个swf,就可以看到效果了,引自http://space.cnblogs.com/q/17912/
有思路已经不错了,这种核心的东西不会泄露出来的,不然豆丁开放api干嘛?
之后 在传 不管什么样的 他都会转换失败
唯一解决的都是 重启
在xp上能转换,但是一到2003 iis6上面死活不行,还有 虚拟打印机很不稳定。