6

I'm trying to create an ebook reader for WP7. So far I haven't been able to find any API to read ePub books with.

Thanks, Zain

Zain Rizvi
  • 21,625
  • 17
  • 82
  • 122
  • you want to create a reader from scratch or simply design a new UI over an existing eReader? – Sriram May 26 '11 at 08:06

3 Answers3

6

For DRM-free html based ePubs(there are also dtbook based ePubs, but I've never seen one) you can simply use a few libraries to build a reader:

  1. An html render control, since the content is based on xhtml 1 and css
  2. A zip library because the container is a zip archive
  3. An xml library to parse the meta data files

For 2. and 3. there are many libraries, some of which support silverlight/WP7. No idea about 1, but I suspect WP7 already offers such a control.

CodesInChaos
  • 100,017
  • 20
  • 197
  • 251
5

Also, you can check out the draft of the ePub 3 spec here

Edit: Fixed the link

EPUB Sharp has not been updated since a long time.

Here's a step by step procedure in building your own (for iPhone, IMO it's good starting point).

Community
  • 1
  • 1
abhilash
  • 5,545
  • 3
  • 34
  • 59
  • 1
    Your second link leads to epub sharp too, and not to the epub spec. And is there any documentation on epub sharp? And I can't find the code in the repo either. – CodesInChaos May 26 '11 at 08:18
2

I would imagine that extracting the contents of the book, as string or simple text and passing it into the Microsoft Speech SDK (SAPI) would work. Functions therein can be called from within c#. Did you try that already?

Sriram
  • 9,536
  • 20
  • 74
  • 130
  • 2
    I'm not the downvoter, but I don't see how this answers the question. I see no indication that the OP needs any text-to-speech. I think he wants to read and render an epub file. – CodesInChaos May 26 '11 at 08:23
  • 2
    There's no need to downvote. The OP said "epub reader", which could easily be misconstrued as an actual reader (with voice) for the epub format. In this case, he meant something to extract and display the data, but I can see how confusion happened. – drharris May 27 '11 at 03:03