Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to read .epub file

Tags:

c#

epub

As we all know .epub is a collection of files. Does anyone have an idea how can we read all that files embed in .epub runtime using C#?

like image 201
Hiscal Avatar asked Dec 04 '09 08:12

Hiscal


2 Answers

The ePub specification supports two formats, a collection of files or a package of files. Most epub's use the packaging. The package is simply a ZIP file with a renamed extension.

The specification can be found here. The OEBPS Container wraps around an ePub version of the Open Packaging Format.

The simplest way to read the content is to unzip the files and look at the xhtml files that were embedded within it.

like image 140
Ray Hayes Avatar answered Oct 21 '22 23:10

Ray Hayes


It is a zip file so how about using the Compression namespace to read the contents. Haven't use it but I'm sure this namespace exposes classes to read zip files as a stream.

like image 1
Raj Avatar answered Oct 21 '22 22:10

Raj