且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用 c# 将 word 文件(.docx & doc)转换为 .pdf 不起作用

更新时间:2023-02-19 20:31:06

我一直在寻找解决这些问题的方法,最后不得不求助于第三方.我建议你使用像 Aspose 这样的第三方Aspose.Total for .NET

I had long been looking for a solution to these issues and in the end I had to use a third party. I suggest you use a third party like Aspose Aspose.Total for .NET

Aspose.Words for .NET 是 .NET 的高级类库,使您能够直接在 .NET 应用程序中执行各种文档处理任务.

Aspose.Words for .NET is an advanced class library for .NET that enables you to perform a wide range of document processing tasks directly within your .NET applications.

使用 Aspose.Words,您可以生成、修改、转换、渲染和打印不使用 Microsoft Word 的文档.

With Aspose.Words you can generate, modify, convert, render and print documents without using Microsoft Word.

Aspose.Words for .NET 支持 DOC、OOXML、RTF、HTML、OpenDocument、PDF、XPS、EPUB 和许多其他格式.

Aspose.Words for .NET supports DOC, OOXML, RTF, HTML, OpenDocument, PDF, XPS, EPUB and many other formats.

这个组件非常适合我并且使用起来非常简单.这是将 word 转换为 pdf 代码的示例:

This component work perfectly for me and very simple to use. this is an example of convert word to pdf code :

Document doc = new Document(getMyDir() + "Document.doc");
doc.save(getMyDir() + "Document.Doc2PdfSave Out.pdf");