//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);

Offic转换pdf 之asposeDLL插件的更多相关文章

  1. OpenOfice将offic转为pdf并且在web显示

    1.将office首先要安装OpenOfice,傻瓜式安装就好了,之后可以使用下列代码将word转为pdf.这个需要导入jodconverter-2.2.2里的 ja r包 import java.i ...

  2. 【docx4j】docx4j操作docx,实现替换内容、转换pdf、html等操作

    主要是想要用此功插件操作docx,主要的操作就是操作段落等信息,另外,也想实现替换docx的内容,实现根据模板动态生成内容的效果,也想用此插件实现docx转换pdf. word的格式其实可以用xml来 ...

  3. atom markdown转换PDF 解决AssertionError: html-pdf: Failed to load PhantomJS module

    atom编辑器markdown转换PDF 解决AssertionError: html-pdf: Failed to load PhantomJS module. You have to set th ...

  4. Word:转换PDF

    本文适用于Word 2007 + Windows 7,造冰箱的大熊猫@cnblogs 2018/8/3 一.Word文档转PDF文档 把Word文档转换为PDF,有两个免费解决方案 1.Microso ...

  5. tp5 使用phpword 替换word模板并利用com组件转换pdf

    tp5   使用phpword 替换word模板并利用com组件转换pdf 一.首先composer安装PHPword,就不多说了 二.然后是把模板中要替换的部分用变量代替 三.把原始的模板文件放入项 ...

  6. SharePoint 2013 Word 转换PDF服务介绍及示例

    前言:在SharePoint使用过程中,经常会发现将文档进行格式转换的需求,之前,看到SharePoint 2013有将PPT转换PDF文档的服务,后来,才发现SharePoint 2010开始,就有 ...

  7. SharePoint Word 转换PDF服务介绍及示例

    前言:在SharePoint使用过程中,经常会发现将文档进行格式转换的需求,之前,看到SharePoint 2013有将PPT转换PDF文档的服务,后来,才发现SharePoint 2010开始,就有 ...

  8. python3图片裁剪+转换pdf+压缩

    本地大量长图,要发送给别人,所以要对图片进行裁剪+转换pdf+压缩 import zipfile import os from concurrent.futures import ThreadPool ...

  9. 将页面内容转换Pdf\Word\Excel格式

    项目中用到了将邮件内容转换为Pdf.Word.Excel格式,做为邮件附件发送. 查了一些解决方案,走了一些弯路.以此代码记录下. 转换PDF需要下载NReco.PdfGenerator.dll 以下 ...

随机推荐

  1. 关于jquery.extend()的坑:我的数组变成相同元素了?

    首先呢我有一个数组,存放了多个json对象.这些json对象的属性有缺失,我设置了一个对象模板来存放默认值 先来看一段代码 var source = [ { name: 'dapianzi', bor ...

  2. poj1753(高斯消元解mod2方程组)

    题目链接:http://poj.org/problem?id=1753 题意:一个 4*4 的棋盘,初始时上面放满了黑色或白色的棋子.对 (i, j) 位置进行一次操作后 (i, j), (i + 1 ...

  3. 解读人:陈秋实,SP2: Rapid and Automatable Contaminant Removal from Peptide Samples for Proteomic Analyses(标准操作流程2:如何在蛋白质组学分析中快速和自动的去除肽段样品中的污染物)

    发表时间:2019年4月 IF:3.950 单位: 威斯康星医学院生物化学系 威斯康星医学院生物医学质谱研究中心 物种:人(人体肾脏细胞和蛋白) 技术:肽段清理 一. 概述:(用精炼的语言描述文章的整 ...

  4. Oracle复制表

    Oracle复制表分为只复制表结构或者结构和数据均复制两种: 只复制表结构 create table newTableName as select * from oldTableName where ...

  5. P1080 国王游戏

    题意: 让n 位大臣排成一排,国王站在队伍的最前面. 排好队后,所有的大臣都会获得国王奖赏的若干金币, 每位大臣获得的金币数分别是:排在该大臣前面的所有人的左手上的数的乘积除以他自己右手上的数,然后向 ...

  6. NSArray,NSMutable和NSSet,NSMutableSet和NSDictionary,NSMutableDictionary用法

    开始编写应用程序的代码时,可以利用大量的 Objective-C 框架.其中,为所有应用程序提供基本服务的 Foundation 框架尤为重要.Foundation 框架包括表示基本数据类型的值类(如 ...

  7. 2018北京网络赛D 80days (尺取)

    #1831 : 80 Days 时间限制:1000ms 单点时限:1000ms 内存限制:256MB 描述 80 Days is an interesting game based on Jules ...

  8. flask-SocketIO

    本文来源:https://www.jianshu.com/p/d81397edd2b1 websocket是html5中实现了服务端和客户端进行双向文本或二进制数据通信的一种新协议,其实已经低于HTT ...

  9. HashMap 1.8的源码分析一

    public class HashMap<K,V> extends AbstractMap<K,V> implements Map<K,V>, Cloneable, ...

  10. Python十大应用领域与就业方向

    参考链接:https://baijiahao.baidu.com/s?id=1604847283884842928&wfr=spider&for=pc 正文: 近些年,编程语言Pyth ...