下载aspose.slides-15.9.0.jar包 http://pan.baidu.com/s/1jH3ZNbK

JAVA代码

 package webViewer;

 import java.io.*;
import com.aspose.slides.*; //引入aspose.slides-15.9.0.jar包 public class Ppt2Pdf {
private static InputStream license; /**
* 获取license
*
* @return
*/
public static boolean getLicense() {
boolean result = false;
try {
license = Test.class.getClassLoader().getResourceAsStream("license.xml");// license路径
License aposeLic = new License();
aposeLic.setLicense(license);
result = true;
} catch (Exception e) {
e.printStackTrace();
}
return result;
} /**
*
* @param args
*/
public static void ppt2pdf(String Address) {
// 验证License
if (!getLicense()) {
return;
} try {
// long old = System.currentTimeMillis();
File file = new File("C:/Program Files (x86)/Apache Software Foundation/Tomcat 7.0/webapps/generic/web/file/pdf1.pdf");// 输出pdf路径
Presentation pres = new Presentation(Address);//输入pdf路径
FileOutputStream fileOS = new FileOutputStream(file);
pres.save(fileOS, SaveFormat.Pdf);
fileOS.close(); // long now = System.currentTimeMillis();
// System.out.println("共耗时:" + ((now - old) / 1000.0) + "秒\n\n" + "文件保存在:" + file.getPath()); //转化过程耗时
} catch (Exception e) {
e.printStackTrace();
}
}
}

调用代码

 package webViewer;

 public class Test {
public static void main(String[] args){
Ppt2Pdf.ppt2pdf("C:/Program Files (x86)/Apache Software Foundation/Tomcat 7.0/webapps/generic/web/file/6.ppt");
}
}

即可生成pdf文档

java利用Aspose.slides.jar将本地ppt文档转化成pdf(完美破解版 无水印 无中文乱码)的更多相关文章

  1. java利用Aspose.cells.jar将本地excel文档转化成pdf(完美破解版 无水印 无中文乱码)

    下载aspose-cells-8.5.2.jar包 http://pan.baidu.com/s/1kUBzsQ7 JAVA代码 package webViewer; import java.io.* ...

  2. C# 利用Aspose.Slides.dll将本地ppt文档转化成pdf(完美破解版 无水印 无中文乱码)

    下载Aspose.Slides.dll   http://pan.baidu.com/s/1kVPjnzL 添加引用C#代码. using System; using System.Collectio ...

  3. java利用Aspose.words.jar将本地word文档转化成pdf(完美破解版 无水印 无中文乱码)

    package doc; import java.io.*; import junit.framework.Test; import com.aspose.words.*; public class ...

  4. C# 利用Aspose.Words .dll将本地word文档转化成pdf(完美破解版 无水印 无中文乱码)

    下载Aspose.Words .dll  http://pan.baidu.com/s/1c8659k 在vs2010中新建窗体应用程序,命名为 wordtopdf 添加Aspose.Words .d ...

  5. C# 利用Aspose.Cells .dll将本地excel文档转化成pdf(完美破解版 无水印 无中文乱码)

    Aspose.Cells .dll下载  http://pan.baidu.com/s/1slRENLF并引用 C#代码 using System; using System.Collections. ...

  6. Java利用aspose-words将word文档转换成pdf(破解 无水印)

    首先下载aspose-words-15.8.0-jdk16.jar包 http://pan.baidu.com/s/1nvbJwnv 引入jar包,编写Java代码 package doc; impo ...

  7. 利用Aspose.Word控件实现Word文档的操作

    Aspose系列的控件,功能都挺好,之前一直在我的Winform开发框架中用Aspose.Cell来做报表输出,可以实现多样化的报表设计及输出,由于一般输出的内容比较正规化或者多数是表格居多,所以一般 ...

  8. 黄聪:利用Aspose.Word控件实现Word文档的操作(转)

    撰写人:伍华聪  http://www.iqidi.com  Aspose系列的控件,功能都挺好,之前一直在我的Winform开发框架中用Aspose.Cell来做报表输出,可以实现多样化的报表设计及 ...

  9. Java实现在线预览Word,Excel,Ppt文档

    效果图:

随机推荐

  1. Python Iterable Iterator Yield

    可以直接作用于for循环的数据类型有以下几种: 一类是集合数据类型,如list / tuple / dict / set / str /等(对于这类iterable的对象,因为你可以按照你的意愿进行重 ...

  2. PHP list,explode的使用

    PHP list,explode的使用 <?php header("Content-type: text/html; charset=utf-8"); echo " ...

  3. ios 写项目的时候遇到的问题及解决方案(3)

    22.看了苹果的文档,里面有这一句话:All launch images must be PNG files and must reside in the top level of your appl ...

  4. rake :You have already activated rake 10.1.0

    rake aborted! You have already activated rake 10.1.0, but your Gemfile requires rake 10.0.3. Using b ...

  5. ruby : nil?, empty? and blank?的选择

    article = nil article.nil? # => true empty? checks if an element - like a string or an array f.e. ...

  6. MySQL服务 - MySQL程序的配置文件、参数、变量查看

    查看配置文件及读取顺序 MySQL的配置文件以.cnf结尾,可能会有多个,而不同版本的MySQL程序的读取配置文件的路径也都不同,要想获取MySQL读取配置文件的顺序可以通过以下指令查看: shell ...

  7. [HTML5]HTML结构性元素(Structure)

    参考自:http://techbrood.com/h5b2a?p=html-structure 结构性元素用来组织文档的各个部分 为了让文档层次分明,我们可以把文档中的元素按其内容的作用进行组合,这就 ...

  8. json&pickle&xml

    json .dumps()    变成 json 的字符串 import json dic={"name":"alex"} data=json.dumps(di ...

  9. Centos 7 在VBox下不能联网

    摘要: 在Virtual Box下选择了Bridge Adaptor模式,安装CENTOS 7,网络连接一直都没有问题,后来不知道什么缘故就突然不能联网,很是烦恼,查询了很多网络方面的配置信息,也做了 ...

  10. Laravel学习笔记(四)数据库 数据库迁移案例

    创建迁移 首先,让我们创建一个MySql数据库“Laravel_db”.接下来打开app/config目录下的database.php文件.请确保default键值是mysql: return arr ...