您的位置:首页 > 教程文章 > 编程开发

C# 利用Aspose.Words.dll将 Word 转成PDF

:0 :2021-04-22 19:33:54

只要把aspose.words.dll 在bin中添加引用即可。
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Aspose.Words;
using Aspose.Words.Saving;
using System.IO;
namespace NewConvertBook
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
//读取doc文档
Document doc = new Document(@C:UsersAdministratorDesktop流调系统存在问题 .doc);
//保存为PDF文件,此处的SaveFormat支持很多种格式,片,epub,rtf 等等
doc.Save(temp.pdf, SaveFormat.Pdf);
}
}
}
对了还要再说一下,这个dll是有水印的。如果需要无水印的。请购买正版的dll。或者使用破解版(不推荐,请支持作者权益)
Aspose.Words.dll 官网

c# 图片加密解密的实例代码
c# 生成随机时间的小例子

同类资源