Word处理控件Aspose.Words功能演示:在 C# 中将 Word 文档转换为 EPUB

EPUB格式用于电子出版物,通常称为电子书。EPUB 文件受到一系列智能设备(如智能手机、平板电脑、笔记本电脑等)的支持。在各种情况下,文档以 MS Word 格式创建,而这些格式通常在智能设备上没有内置支持。因此,Word 文件被转换为 EPUB 格式。在本文中,您将学习如何使用 C# 以编程方式将 Word(DOCX、DOC等)文件转换为 EPUB。

Aspose.Words for .NET 最新下载icon-default.png?t=M85Bhttps://www.evget.com/product/564/download

提示:如果您需要从 PowerPoint 演示文稿中获取 Word 文档,您可以使用 Aspose演示文稿到 Word 文档转换器。

用于 Word 到 EPUB 转换的 C# API

为了将 MS Word 文件转换为 EPUB 格式,我们将使用Aspose.Words for .NET。该 API 旨在处理 .NET 应用程序中的 MS Word 文档。它使您可以创建、操作和转换高保真 Word 文档。您可以 下载 API 的 DLL 或 使用包管理器控制台直接从NuGet安装它。

PM> Install-Package Aspose.Words

在 C# 中将 Word 文档转换为 EPUB

以下是在 C# 中将 Word DOCX 文件转换为 EPUB 的步骤。

  • 使用Document类加载 Word DOCX/DOC 文件。
  • 使用Document.Save(string)方法将文档保存为 EPUB 。

在 C# 中自定义 Word 到 EPUB 的转换

您还可以使用 Aspose.Words for .NET 提供的不同选项自定义 Word 到 EPUB 的转换。例如,您可以指定编码方案、启用或禁用导出文档信息等。以下是自定义 Word 到 EPUB 转换的步骤。

  • 类加载 Word DOCX/DOC 文件。
  • 创建Html使用DocumentSaveOptions类的对象并设置所需的选项。
  • 使用Document.Save(string, HtmlSaveOptions)方法将文档保存为 EPUB 。

结论

在本文中,您学习了如何在 C# 中将 Word 文档转换为 EPUB 格式。此外,您还了解了如何使用不同的选项动态自定义 Word 到 EPUB 的转换。除此之外,您可以访问 文档以探索有关 Aspose.Words for .NET 的更多信息。如有任何疑问,您可以随时告知我们。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
C# Programming Cookbook by Dirk Strauss English | 2016 | ISBN: 1786467305 | EPUB+MOBI+PDF Key Features Unique recipes for C#, that places it in its real-world context. You will be able to get yourself out of any coding-corner youve backed yourself into. All code samples available through GitHub to bring C#. In line with modern development workflows, written to the latest specification of C# 6.0. Book Description During your application development workflow, there is always a moment when you need to get out of a tight spot. Through a recipe-based approach, this book will help you overcome common programming problems and get your applications ready to face the modern world. We start with C# 6, giving you hands-on experience with the new language features. Next, we work through the tasks that you perform on a daily basis such as working with strings, generics, and lots more. Gradually, we move on to more advanced topics such as the concept of object-oriented programming, asynchronous programming, reactive extensions, and code contracts. You will learn responsive high performance programming in C# and how to create applications with Azure. Next, we will review the choices available when choosing a source control solution. At the end of the book, we will show you how to create secure and robust code, and will help you ramp up your skills when using the new version of C# 6 and Visual Studio What You Will Learn Write better and less code to achieve the same result as in previous versions of C#. Generate tests from the Code Contracts for mission critical methods. Integrate code in Visual Studio with GitHub. Create a web application in Azure. Design and build a microservice architecture Demystify the Rx library using Reactive extensions Write high performing codes in C# and understanding multi-threading. Security and Debugging. Implement Code Contracts on code in Visual Studio. About the Author Dirk Strauss is a software developer and Microsoft .NET MVP from South Africa

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值