//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. requests模块demo

    import urllib.request import requests from requests.auth import HTTPBasicAuth from requests.auth imp ...

  2. (multi)set的某些操作

    (multi)set的某些操作 我们可以把multiset当作平衡树用~ 注意,必须定义小于运算符. s.begin() 返回指向第一个元素的迭代器. s.end() 返回指向最后元素的后面那个虚拟元 ...

  3. Java foreach remove问题分析

    原文链接:http://www.cnblogs.com/chrischennx/p/9610853.html 都说ArrayList在用foreach循环的时候,不能add元素,也不能remove元素 ...

  4. tftp简单文件传输协议搭建

    TFTP 简单文件传输协议     安装     sudo apt-get install tftp  tftpd openbsd-inetd     需要tftp tftpd openbsd-ine ...

  5. [USACO19FEB]Moorio Kart(DP)

    Luogu5243 题解 即O(N^2)暴力统计出每个森林的路径,从ctgn个集合中各选出一个数,使得长度>=Y的方案数. 用背包统计.具体实现: \(dp[i+j][0]\leftarrow ...

  6. Rabbitmq相关学习网址

    1.安装文档: http://www.cnblogs.com/shuzhenyu/p/9823324.html 2.RabbitMq的整理 exchange.route.queue关系 https:/ ...

  7. Java中的String、StringBuffer和StringBuilder的区别

    类型  是否可变  线程安全  能否频繁修改  String  不可变  安全  否  StringBuffer  可变  安全  能  StringBuilder  可变  不安全  能 1.可变与 ...

  8. C语言指针收藏

    指针是什么 >>每一个内存单元只能同时存储一个数据,如何保证内存单元同时只能存储一个数据,可以使用编号的方式实现内存单元标记,此编号就是指针. >>指针是一个变量,指针是存放着 ...

  9. 傻瓜式Spring教学第一课

    首先,把Spring需要的五个包导入项目: commons-logging-1.2.jar spring-beans-4.3.4.RELEASE.jar spring-context-4.3.4.RE ...

  10. 图像数据转换成db(leveldb/lmdb)文件(转)

    参考网站:http://www.cnblogs.com/denny402/p/5082341.html 在深度学习的实际应用中,我们经常用到的原始数据是图片文件,如jpg,jpeg,png,tif等格 ...