Offic转换pdf 之asposeDLL插件
2018-06-18 04:19:56来源:未知 阅读 ()
//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
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有
下一篇:动态加载内嵌类库文件的方法
- 怎么用Java 高效提取、替换、删除PDF文档中的图片 2020-06-09
- Java电子书高清PDF集合免费下载 2020-06-05
- Kotlin与java8的SAM转换对比 2020-06-03
- Java 给PDF文档添加页码 2020-05-29
- 备战面试,牢记这份Java面经,大厂在向你招手「含PDF文档资 2020-05-21
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