Aspose.word直接转pdf
2024-10-19 14:35:31
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Aspose.Words;
using Aspose.Words.Saving;
using System.IO;
using System.Drawing;
using System.Text;
using Aspose.Cells;
public partial class Word2PDF : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
Document doc = new Document(@"C:\Users\DUANCHENGHUA\Desktop\质量月PPT\2015年质量月活动方案 - 副本.doc");
doc.Save(@"C:\Users\DUANCHENGHUA\Desktop\2015年质量月活动方案 - 副本.pdf", Aspose.Words.SaveFormat.Pdf); }
}
2.Excel转PDF、PPT转PDF
1.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Aspose.Words;
using Aspose.Words.Saving;
using System.IO;
using System.Drawing;
using System.Text;
using Aspose.Cells;//Excel
using Aspose.Slides;//PPT
public partial class Word2PDF : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
//Excel
Workbook excel = new Workbook(@"C:\Users\DUANCHENGHUA\Desktop\数据库信息表.xlsx");
excel.Save(@"C:\Users\DUANCHENGHUA\Desktop\数据库信息表.pdf", Aspose.Cells.SaveFormat.Pdf);
//PPT
Presentation ppt = new Presentation(@"C:\Users\DUANCHENGHUA\Desktop\2015年质量月活动1509.ppt");
ppt.Save(@"C:\Users\DUANCHENGHUA\Desktop\2015年质量月活动1509.pdf", Aspose.Slides.Export.SaveFormat.Pdf);
//PPTX
Aspose.Slides.Pptx.PresentationEx pptx = new Aspose.Slides.Pptx.PresentationEx(@"C:\Users\DUANCHENGHUA\Desktop\演示文稿1.pptx");
pptx.Save(@"C:\Users\DUANCHENGHUA\Desktop\演示文稿1.pdf", Aspose.Slides.Export.SaveFormat.Pdf); }
}
最新文章
- Redis 的安装与使用(linux)
- 文档对象模型(DOM)中的结点属性
- 【海岛帝国系列赛】No.7 海岛帝国:神圣之日
- C++11的一些新特性
- Gulp实战(二)
- json 数字key json 数字作为主键
- 有几数组表单,js怎么获得数组并动态相加输出到文本框
- CSS简介和CSS选择器
- boost 轻量级信号量
- 返璞归真 asp.net mvc (9) - asp.net mvc 3.0 新特性之 View(Razor)
- 《JavaScript高级程序设计》读书笔记 ---基本包装类型
- Java课程设计--GUI密码生成器201521123033
- [转载]解决sudo: sorry, you must have a tty to run sudo
- 作为一个懒虫,如何优雅的使用windows
- 【原创】数据库基础之Mysql(2)主从库配置
- January 09th, 2018 Week 02nd Tuesday
- golang使用simplejson库解析复杂json
- C语言写了一个socket client端,适合windows和linux,用GCC编译运行通过
- VMware虚拟CentOS 6.5在NAT模式下配置静态IP地址及Xshell远程控制配置
- Mina源码研究
热门文章
- 点分治Day2 动态树分治
- jsp基本概念
- 「CF779B」「LOJ#10201.」「一本通 6.2 练习 4」Sherlock and His Girlfriend(埃氏筛
- 1067 Bash 游戏v2
- BZOJ1798:[AHOI2009]维护序列
- 使用Axis2方式发布webService的三种方式
- 微信小程序开发之日期组件
- 抽象方法(abstract method) 和 虚方法 (virtual method), 重载(overload) 和 重写(override)的区别于联系
- 附近wifi都是你的
- ECMA 上传文件到SHarePoint 文档库