开发者

how to get the images of epub book in android

i was trying to read the epub book into my android application and succeed withe getting text into my app but not able to load images of epub book. actually what happen when we read the epub book using epub library (it extract/read the epub book and store somewhere in temporary the contents if it store than where the images of epub book is located ?). When i was try to read the image of book it give an error. when i read the content of book it return me HTML page containing the开发者_如何学C text and image path, but image path is relative like <img src='images/cover.jpg'> so where i get the images.

Thanks in advance


The path should be relative to the xhtml file within the archive. That is, if your xhtml file has an image <img src='image/cover.jpg'>, then your image file should be located in a subdirectory relative to the xhtml file called "image".

The .opf file in the .epub is a manifest that should contain a reference to each file within the archive -- including any images. If the image is not referenced there, you might have an invalid epub. The idpf guys maintain an epub validation tool that you can download here: Google code.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜