Offic转换pdf 之asposeDLL插件
//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插件的更多相关文章
- OpenOfice将offic转为pdf并且在web显示
1.将office首先要安装OpenOfice,傻瓜式安装就好了,之后可以使用下列代码将word转为pdf.这个需要导入jodconverter-2.2.2里的 ja r包 import java.i ...
- 【docx4j】docx4j操作docx,实现替换内容、转换pdf、html等操作
主要是想要用此功插件操作docx,主要的操作就是操作段落等信息,另外,也想实现替换docx的内容,实现根据模板动态生成内容的效果,也想用此插件实现docx转换pdf. word的格式其实可以用xml来 ...
- 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 ...
- Word:转换PDF
本文适用于Word 2007 + Windows 7,造冰箱的大熊猫@cnblogs 2018/8/3 一.Word文档转PDF文档 把Word文档转换为PDF,有两个免费解决方案 1.Microso ...
- tp5 使用phpword 替换word模板并利用com组件转换pdf
tp5 使用phpword 替换word模板并利用com组件转换pdf 一.首先composer安装PHPword,就不多说了 二.然后是把模板中要替换的部分用变量代替 三.把原始的模板文件放入项 ...
- SharePoint 2013 Word 转换PDF服务介绍及示例
前言:在SharePoint使用过程中,经常会发现将文档进行格式转换的需求,之前,看到SharePoint 2013有将PPT转换PDF文档的服务,后来,才发现SharePoint 2010开始,就有 ...
- SharePoint Word 转换PDF服务介绍及示例
前言:在SharePoint使用过程中,经常会发现将文档进行格式转换的需求,之前,看到SharePoint 2013有将PPT转换PDF文档的服务,后来,才发现SharePoint 2010开始,就有 ...
- python3图片裁剪+转换pdf+压缩
本地大量长图,要发送给别人,所以要对图片进行裁剪+转换pdf+压缩 import zipfile import os from concurrent.futures import ThreadPool ...
- 将页面内容转换Pdf\Word\Excel格式
项目中用到了将邮件内容转换为Pdf.Word.Excel格式,做为邮件附件发送. 查了一些解决方案,走了一些弯路.以此代码记录下. 转换PDF需要下载NReco.PdfGenerator.dll 以下 ...
随机推荐
- Windows 下 Swoole开发环境配置
一直停留在windows,入了 jetbrains 的全家桶.准备入门 Swoole,不可能每做一点修改就 git push 运行一下.因此要在 windows 上配置 swoole 运行环境.对比了 ...
- 转载 MySQL创建表的语句 示例
show variables like 'character_set_client';#查询字符集 show databases;#列出所有的服务器上的数据库alter create database ...
- phaser小游戏框架学习(一)
这两天由于项目的需要,所以简单学了一下phaser框架. 官网:http://phaser.io/ 还有一个phaser小站,是中文的网站,但是内容不如英文文档全,大家也可以去看这个网站,需要查阅AP ...
- Index Filter及ICP特性
原文链接:http://hedengcheng.com/?p=577 (一)问题描述 一条SQL,在数据库中是如何执行的呢?相信很多人都会对这个问题比较感兴趣.当然,要完整描述一条SQL在数据库中的生 ...
- flink学习笔记-各种Time
说明:本文为<Flink大数据项目实战>学习笔记,想通过视频系统学习Flink这个最火爆的大数据计算框架的同学,推荐学习课程: Flink大数据项目实战:http://t.cn/EJtKh ...
- P1742 最小圆覆盖
\(\color{#0066ff}{题目描述}\) 给出N个点,让你画一个最小的包含所有点的圆. \(\color{#0066ff}{输入格式}\) 先给出点的个数N,2<=N<=1000 ...
- Python中使用Beautiful Soup库的超详细教程
[参考文献] http://www.jb51.net/article/65287.htm
- 解读 pytorch对resnet的官方实现
地址:https://github.com/pytorch/vision/blob/master/torchvision/models/resnet.py 贴代码 import torch.nn as ...
- php 安装扩展库
liunx系统 1. /usr/local/php/bin/php-config php 配置文件位置 [ php-config是一个脚本文件,用于获取所安装的php配置的信息 ] 在编译扩展时,如果 ...
- 工具类_GsonUtils
import java.lang.reflect.Type; import com.google.gson.Gson; /** * Gson工具类 2015-02-01<br/> * 1, ...