Offic转换pdf 之asposeDLL插件
2018-06-27 09:54:38来源:未知 阅读 ()
//excel转换 Workbook workbook = new Workbook(HttpContext.Current.Server.MapPath(docpath + "/" + newFileName + sExtension));//找到转换文件 string newFilePath = docpath + "NewFile/"; string newuploadPath = HttpContext.Current.Server.MapPath(newFilePath);//找到转换后文件所存放的路径 string newfileName = newFileName + ".pdf"; string err = ""; if (!Directory.Exists(newuploadPath))//没有此文件夹直接创建 { Directory.CreateDirectory(newuploadPath); } workbook.Save(HttpContext.Current.Server.MapPath(newFilePath + newfileName), Aspose.Cells.SaveFormat.Pdf);//转换中 //word转换 Aspose.Words.Document doc = new Aspose.Words.Document(HttpContext.Current.Server.MapPath(docpath + "/" + newFileName + sExtension)); string newFilePath = docpath + "NewFile/"; string newuploadPath = HttpContext.Current.Server.MapPath(newFilePath); string newfileName = newFileName + ".pdf"; string err = ""; if (!Directory.Exists(newuploadPath)) { Directory.CreateDirectory(newuploadPath); } doc.Save(HttpContext.Current.Server.MapPath(newFilePath + newfileName), Aspose.Words.SaveFormat.Pdf); //ppt转换 Presentation pres = new Presentation(HttpContext.Current.Server.MapPath(docpath + "/" + newFileName + sExtension)); string newFilePath = docpath + "NewFile/"; string newuploadPath = HttpContext.Current.Server.MapPath(newFilePath); string newfileName = newFileName + ".pdf"; string err = ""; if (!Directory.Exists(newuploadPath)) { Directory.CreateDirectory(newuploadPath); } pres.Save(HttpContext.Current.Server.MapPath(newFilePath + newfileName), Aspose.Slides.Export.SaveFormat.Pdf);
标签:
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有
上一篇:C#基础之运行环境
下一篇:.Net 面试题 汇总(二)
- C++ 转换函数搭配友元函数 2020-06-10
- C++ 自动转换和强制类型转换(用户自定义类类型) 2020-06-10
- C++中强制类型转换的应用(第一次) 2020-04-09
- [题记]字符串转换整数-leetcode 2020-04-03
- c++中的类型转换 2020-03-01
IDC资讯: 主机资讯 注册资讯 托管资讯 vps资讯 网站建设
网站运营: 建站经验 策划盈利 搜索优化 网站推广 免费资源
网络编程: Asp.Net编程 Asp编程 Php编程 Xml编程 Access Mssql Mysql 其它
服务器技术: Web服务器 Ftp服务器 Mail服务器 Dns服务器 安全防护
软件技巧: 其它软件 Word Excel Powerpoint Ghost Vista QQ空间 QQ FlashGet 迅雷
网页制作: FrontPages Dreamweaver Javascript css photoshop fireworks Flash