1000字范文,内容丰富有趣,学习的好帮手!
1000字范文 > Word控件Spire.Doc 转换教程(三十):C# VB.NET 在 Azure 应用程序中将 Word 转换为 PDF

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

时间:2024-06-22 23:41:19

相关推荐

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

可以使用Spire.Doc for .NET在 Azure 应用程序(例如 Azure Web 应用程序和 Azure Functions 应用程序)中执行 Word 到 PDF 的转换。在本文中,您可以看到使用 Spire.Doc for .NET 实现此功能的代码示例。

Spire.Doc 最新下载

欢迎下载|体验更多E-iceblue产品技术交流Q群(767755948)

输入Word文档:

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

第 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);

[]

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 文档:

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。