*这么优秀的国产工具怎能错过呢!在线下单专享“一口价”,查看折扣价!想要获取更多福利的朋友可以咨询在线客服哦~
输入的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);
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
输出文件

是E-iceblue官方友好合作伙伴,如果您对spire.Doc感兴趣,可以联系在线客服了解具体授权价格和使用机制。
标签:
声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!