本文主要介绍了如何使用Spire.Doc 在C#、VB.NET Azure 应用程序中将 Word 转换为 PDF,欢迎查阅!
可以使用
输入Word文档:
第 1 步:安装 Spire.Doc NuGet 包作为 NuGet.org 项目的参考。
第 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 文档:
欢迎下载|体验更多E-iceblue产品
如需获取更多产品相关信息请咨询在线客服
标签:
来源:慧都网
声明:本站部分文章及图片转载于互联网,内容版权归原作者所有,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!