java利用Aspose.slides.jar将本地ppt文档转化成pdf(完美破解版 无水印 无中文乱码)
下载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(完美破解版 无水印 无中文乱码)的更多相关文章
- java利用Aspose.cells.jar将本地excel文档转化成pdf(完美破解版 无水印 无中文乱码)
下载aspose-cells-8.5.2.jar包 http://pan.baidu.com/s/1kUBzsQ7 JAVA代码 package webViewer; import java.io.* ...
- C# 利用Aspose.Slides.dll将本地ppt文档转化成pdf(完美破解版 无水印 无中文乱码)
下载Aspose.Slides.dll http://pan.baidu.com/s/1kVPjnzL 添加引用C#代码. using System; using System.Collectio ...
- java利用Aspose.words.jar将本地word文档转化成pdf(完美破解版 无水印 无中文乱码)
package doc; import java.io.*; import junit.framework.Test; import com.aspose.words.*; public class ...
- C# 利用Aspose.Words .dll将本地word文档转化成pdf(完美破解版 无水印 无中文乱码)
下载Aspose.Words .dll http://pan.baidu.com/s/1c8659k 在vs2010中新建窗体应用程序,命名为 wordtopdf 添加Aspose.Words .d ...
- C# 利用Aspose.Cells .dll将本地excel文档转化成pdf(完美破解版 无水印 无中文乱码)
Aspose.Cells .dll下载 http://pan.baidu.com/s/1slRENLF并引用 C#代码 using System; using System.Collections. ...
- Java利用aspose-words将word文档转换成pdf(破解 无水印)
首先下载aspose-words-15.8.0-jdk16.jar包 http://pan.baidu.com/s/1nvbJwnv 引入jar包,编写Java代码 package doc; impo ...
- 利用Aspose.Word控件实现Word文档的操作
Aspose系列的控件,功能都挺好,之前一直在我的Winform开发框架中用Aspose.Cell来做报表输出,可以实现多样化的报表设计及输出,由于一般输出的内容比较正规化或者多数是表格居多,所以一般 ...
- 黄聪:利用Aspose.Word控件实现Word文档的操作(转)
撰写人:伍华聪 http://www.iqidi.com Aspose系列的控件,功能都挺好,之前一直在我的Winform开发框架中用Aspose.Cell来做报表输出,可以实现多样化的报表设计及 ...
- Java实现在线预览Word,Excel,Ppt文档
效果图:
随机推荐
- GitBook制作电子书详细教程(命令行版)
GitBook 是一款基于 Node.js 开发的开源的工具,可以通过命令行的方式创建电子书项目,再使用 MarkDown 编写电子书内容,然后生成 PDF.ePub.mobi 格式的电子书,或生成一 ...
- 将 Shiro 作为应用的权限基础
Shiro 是 Java 世界中新近出现的权限框架,较之 JAAS 和 Spring Security,Shiro 在保持强大功能的同时,还在简单性和灵活性方面拥有巨大优势.本文介绍了 Shiro 的 ...
- bzoj4750: 密码安全
Description 有些人在社交网络中使用过许多的密码,我们通过将各种形式的信息转化为 01 信号,再转化为整数,可以将这个 人在一段时间内使用过的密码视为一个长度为 n 的非负整数序列 A_1, ...
- python---IPy
Python第三方模块IPy,可完成高效的IP规划工作 #安装 #pip3 install IPy #最新版本V0.83 IP地址 网段的基本处理 >>>from IPy impor ...
- 为luna版本eclipse增加Web插件
插件地址: http://download.eclipse.org/releases/luna/
- JUnit 简介
一.简介 JUnit是一个开源的java单元测试框架.在1997年,由 Erich Gamma 和 Kent Beck 开发完成.这两个牛人中 Erich Gamma 是 GOF 之一:Kent Be ...
- x64 PL/SQL 连接 Oralce 提示 Could not initialize oci.dll
在 x64 的 Win10 上重新安装了 Oralce 后,通过 PL/SQL 连接数据库时,提示如下错误信息 环境 windows7 64bit Oracle win64 11gR2 PL/SQL ...
- i2c 读写
在I2C设备读取,必须是在同一个周期内. 一个例子,可以同时读出两个值 int read_register_double_value(int reg_addr, unsigned char *valu ...
- Request.ServerVariables
APPL_MD_PATH-->APPL_PHYSICAL_PATH-->C:\Users\TomZhang\Desktop\GAP\后台修改\UMS\UMSSite\AUTH_TYPE-- ...
- Linux学习笔记之——基础命令学习
1.find 按照名字查找:find / -name file_name 2.zip压缩 1) 我想把一个文件repartition.txt和一个目录invader压缩成为amateur.zip: ...