Word控件Spire.Doc 转换教程(三十):C#、VB.NET 在 Azure 应用程序中将 Word 转换为 PDF

本文主要介绍了如何使用Spire.Doc 在C#、VB.NET Azure 应用程序中将 Word 转换为 PDF,欢迎查阅!

可以使用

输入Word文档:

C#、VB.NET 在 Azure 应用程序中将 Word 转换为 PDF

第 1 步安装 Spire.Doc NuGet 包作为 NuGet.org 项目的参考。

C#、VB.NET 在 Azure 应用程序中将 Word 转换为 PDF

第 2 步添加以下代码以将 Word 转换为 PDF。

[C#]

//Create a Document instanceDocument document = new Document();//Load the Word documentdocument.LoadFromFile(@"sample.docx");//Create a ToPdfParameterList instanceToPdfParameterList ps = new ToPdfParameterList{UsePSCoversion = true};//Save Word document to PDF using PS conversiondocument.SaveToFile("ToPdf.pdf", ps);

[VB.NET]

Private Sub SurroundingSub()Dim document As Document = New Document()document.LoadFromFile("sample.docx")Dim ps As ToPdfParameterList = New ToPdfParameterList With {.UsePSCoversion = True}document.SaveToFile("ToPdf.pdf", ps)End Sub

输出 PDF 文档:

C#、VB.NET 在 Azure 应用程序中将 Word 转换为 PDF

 


欢迎下载|体验更多E-iceblue产品

如需获取更多产品相关信息请咨询在线客服  

aspose最新版合集


标签:

来源:慧都网

声明:本站部分文章及图片转载于互联网,内容版权归原作者所有,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!

上一篇 2022年1月20日
下一篇 2022年1月20日

相关推荐

发表回复

登录后才能评论