What is EPub
EPub is one kind of Open eBook standard, which can display contents according to features of readers to suit for reading. It used XHTML or DTBook to present text and packs contents with zip format. So, actually, EPub is simple ZIP format file but with extension .epub.
How to view an EPub file? There are several kinds of EPub readers. One of the most frequently used is Adobe Digital Editions because it can read and manage EPub files easily.
How to create an EPub file? Because nearly all the contents in EPub is xml, so users can create XML tool to create EPub files instead of using professional software. The other method to get EPub file is to convert from other format files, for example, Word to EPub.
How to Convert Word to EPub
In this post, I want to introduce a method about how to convert Word document to EPub with C#/VB.NET.
I use a component, Spire.Doc to realize this conversion in my example. Before coding, I have added its dll file as reference in my project.
Detailed Steps Shown as Following:
I. Load file which I want to convert to EPub from computer by using document.LoadFromFile() method.
Document document = new Document();
Dim document As New Document()
II. Use document.SaveToFile() method to save Word document as EPub. There are two parameters sent to this method, string file name and file format.
III. Launch for getting this converted EPub file.
Note: Although Word document I convert to EPub is .DOCX, this method can be used to convert .DOC document to EPub as well.
Result Shown as Following:
Click Here to LEARN MORE about Spire.Doc
Click Here to DOWNLOAD Spire.Doc
Spire.Office also can be used to realize this function.